Skip to content

Commit 419c283

Browse files
author
Nicolas Tallar
committed
Merge branch 'phase/beta1' of github.com:input-output-hk/etc-client into fix/keysFileNameWindows
2 parents bbd3d50 + 9fd2e89 commit 419c283

File tree

15 files changed

+310
-303
lines changed

15 files changed

+310
-303
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ enablePlugins(JavaAppPackaging, SolidityPlugin)
22

33
val commonSettings = Seq(
44
name := "mantis",
5-
version := "0.1",
5+
version := "0.3-cli-beta",
66
scalaVersion := "2.12.1"
77
)
88

src/main/resources/application.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ mantis {
1919

2020
# one of the algorithms defined here:
2121
# https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#SecureRandom
22-
secure-random-algo = "NativePRNG"
22+
# Uncomment this to specify, otherwise use the default implementation
23+
# secure-random-algo = "NativePRNG"
2324

2425
network {
2526
# Ethereum protocol version

src/main/scala/io/iohk/ethereum/nodebuilder/NodeBuilder.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ trait GenesisDataLoaderBuilder {
406406
}
407407

408408
trait SecureRandomBuilder {
409-
lazy val secureRandom: SecureRandom = SecureRandom.getInstance(Config.secureRandomAlgo)
409+
lazy val secureRandom: SecureRandom =
410+
Config.secureRandomAlgo.map(SecureRandom.getInstance(_)).getOrElse(new SecureRandom())
410411
}
411412

412413
trait Node extends NodeKeyBuilder

src/main/scala/io/iohk/ethereum/utils/Config.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ object Config {
3131

3232
val shutdownTimeout: Duration = config.getDuration("shutdown-timeout").toMillis.millis
3333

34-
val secureRandomAlgo: String = config.getString("secure-random-algo")
34+
val secureRandomAlgo: Option[String] =
35+
if(config.hasPath("secure-random-algo")) Some(config.getString("secure-random-algo"))
36+
else None
3537

3638
object Network {
3739
private val networkConfig = config.getConfig("network")

src/universal/conf/application.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-Dconfig.file=./conf/mantis.conf -Dlogback.configurationFile=./conf/logback.xml -Xss10M
1+
-Dconfig.file=./conf/mantis.conf -Dlogback.configurationFile=./conf/logback.xml -J-Xss10M

src/universal/conf/blockchain.conf

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
1-
mantis {
2-
blockchain {
3-
# Frontier block number
4-
# frontier-block-number = "0"
5-
6-
# Homestead fork block number
7-
# Doc: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.md
8-
# homestead-block-number = "1150000"
9-
10-
# EIP-150 fork block number
11-
# Doc: https://github.com/ethereum/EIPs/issues/150
12-
# eip150-block-number = "2500000"
13-
14-
# EIP-155 fork block number
15-
# Doc: https://github.com/ethereum/eips/issues/155
16-
# 3 000 000 following lead of existing clients implementation to maintain compatibility
17-
# https://github.com/paritytech/parity/blob/b50fb71dd1d29dfde2a6c7e1830447cf30896c31/ethcore/res/ethereum/classic.json#L15
18-
# eip155-block-number = "3000000"
19-
20-
# EIP-160 fork block number
21-
# Doc: https://github.com/ethereum/EIPs/issues/160
22-
# eip160-block-number = "3000000"
23-
24-
# Difficulty bomb pause block number
25-
# Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1010.md
26-
# difficulty-bomb-pause-block-number = "3000000"
27-
28-
# Difficulty bomb continuation block number
29-
# Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1010.md
30-
# difficulty-bomb-continue-block-number = "5000000"
31-
32-
# DAO fork block number (Ethereum HF/Classic split)
33-
# https://blog.ethereum.org/2016/07/20/hard-fork-completed/
34-
# dao-fork-block-number = "1920000"
35-
36-
# The hash of the accepted DAO fork block
37-
# dao-fork-block-hash = "94365e3a8c0b35089c1d1195081fe7489b528a84b22199c916180db8b28ade7f"
38-
39-
# Starting nonce a an empty account. Some networks (like Morden) use different values.
40-
# account-start-nonce = "0"
41-
42-
# The ID of the accepted chain
43-
# chain-id = "3d"
44-
45-
# Custom genesis JSON file
46-
# null value indicates using default genesis definition that matches the main network
47-
# custom-genesis-file = null
48-
49-
# Monetary policy parameters
50-
# Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md
51-
monetary-policy {
52-
# Block reward in the first era
53-
# first-era-block-reward = "5000000000000000000"
54-
55-
# Monetary policy era duration in number of blocks
56-
# era-duration = 5000000
57-
58-
# Rate at which rewards get reduced in successive eras.
59-
# Value in range [0.0, 1.0]
60-
# reward-reduction-rate = 0.2
61-
}
62-
}
63-
}
1+
mantis {
2+
blockchain {
3+
# Frontier block number
4+
# frontier-block-number = "0"
5+
6+
# Homestead fork block number
7+
# Doc: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.md
8+
# homestead-block-number = "1150000"
9+
10+
# EIP-150 fork block number
11+
# Doc: https://github.com/ethereum/EIPs/issues/150
12+
# eip150-block-number = "2500000"
13+
14+
# EIP-155 fork block number
15+
# Doc: https://github.com/ethereum/eips/issues/155
16+
# 3 000 000 following lead of existing clients implementation to maintain compatibility
17+
# https://github.com/paritytech/parity/blob/b50fb71dd1d29dfde2a6c7e1830447cf30896c31/ethcore/res/ethereum/classic.json#L15
18+
# eip155-block-number = "3000000"
19+
20+
# EIP-160 fork block number
21+
# Doc: https://github.com/ethereum/EIPs/issues/160
22+
# eip160-block-number = "3000000"
23+
24+
# Difficulty bomb pause block number
25+
# Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1010.md
26+
# difficulty-bomb-pause-block-number = "3000000"
27+
28+
# Difficulty bomb continuation block number
29+
# Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1010.md
30+
# difficulty-bomb-continue-block-number = "5000000"
31+
32+
# DAO fork block number (Ethereum HF/Classic split)
33+
# https://blog.ethereum.org/2016/07/20/hard-fork-completed/
34+
# dao-fork-block-number = "1920000"
35+
36+
# The hash of the accepted DAO fork block
37+
# dao-fork-block-hash = "94365e3a8c0b35089c1d1195081fe7489b528a84b22199c916180db8b28ade7f"
38+
39+
# Starting nonce a an empty account. Some networks (like Morden) use different values.
40+
# account-start-nonce = "0"
41+
42+
# The ID of the accepted chain
43+
# chain-id = "3d"
44+
45+
# Custom genesis JSON file
46+
# null value indicates using default genesis definition that matches the main network
47+
# custom-genesis-file = null
48+
49+
# Monetary policy parameters
50+
# Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md
51+
monetary-policy {
52+
# Block reward in the first era
53+
# first-era-block-reward = "5000000000000000000"
54+
55+
# Monetary policy era duration in number of blocks
56+
# era-duration = 5000000
57+
58+
# Rate at which rewards get reduced in successive eras.
59+
# Value in range [0.0, 1.0]
60+
# reward-reduction-rate = 0.2
61+
}
62+
}
63+
}

src/universal/conf/logback.xml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
<configuration>
2-
3-
<property name="stdoutEncoderPattern" value="%d{HH:mm:ss} %msg%n" />
4-
<property name="fileEncoderPattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} %X{akkaSource} - %msg%n" />
5-
6-
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
7-
<encoder>
8-
<pattern>${stdoutEncoderPattern}</pattern>
9-
</encoder>
10-
</appender>
11-
12-
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
13-
<file>mantis.log</file>
14-
<append>true</append>
15-
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
16-
<fileNamePattern>mantis.%i.log.zip</fileNamePattern>
17-
<minIndex>1</minIndex>
18-
<maxIndex>10</maxIndex>
19-
</rollingPolicy>
20-
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
21-
<maxFileSize>10MB</maxFileSize>
22-
</triggeringPolicy>
23-
<encoder>
24-
<pattern>${fileEncoderPattern}</pattern>
25-
</encoder>
26-
</appender>
27-
28-
<root level="INFO">
29-
<appender-ref ref="STDOUT" />
30-
<appender-ref ref="FILE" />
31-
</root>
32-
1+
<configuration>
2+
3+
<property name="stdoutEncoderPattern" value="%d{HH:mm:ss} %msg%n" />
4+
<property name="fileEncoderPattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} %X{akkaSource} - %msg%n" />
5+
6+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
7+
<encoder>
8+
<pattern>${stdoutEncoderPattern}</pattern>
9+
</encoder>
10+
</appender>
11+
12+
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
13+
<file>mantis.log</file>
14+
<append>true</append>
15+
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
16+
<fileNamePattern>mantis.%i.log.zip</fileNamePattern>
17+
<minIndex>1</minIndex>
18+
<maxIndex>10</maxIndex>
19+
</rollingPolicy>
20+
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
21+
<maxFileSize>10MB</maxFileSize>
22+
</triggeringPolicy>
23+
<encoder>
24+
<pattern>${fileEncoderPattern}</pattern>
25+
</encoder>
26+
</appender>
27+
28+
<root level="INFO">
29+
<appender-ref ref="STDOUT" />
30+
<appender-ref ref="FILE" />
31+
</root>
32+
3333
</configuration>

src/universal/conf/mantis.conf

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# This is the main configuration file for the Mantis ETC client.
2-
# It consist of series of include where actual settings are defined.
3-
4-
5-
# This where all the default settings are defined (this file is packaged within the executable).
6-
# It should always go at the top.
7-
include "application.conf"
8-
9-
# The following include are where users are expected to defined their own configuration overrides.
10-
# To override a setting, go to a specific file, uncomment a setting and provide a value.
11-
include "network.conf"
12-
include "storage.conf"
13-
include "blockchain.conf"
14-
include "sync.conf"
15-
include "misc.conf"
16-
17-
# Uncomment the following include to connect to the testnet Morden.
18-
# Note that any settings in this file will override the ones defined in the files above
19-
# include "morden.conf"
1+
# This is the main configuration file for the Mantis ETC client.
2+
# It consist of series of include where actual settings are defined.
3+
4+
5+
# This where all the default settings are defined (this file is packaged within the executable).
6+
# It should always go at the top.
7+
include "application.conf"
8+
9+
# The following include are where users are expected to defined their own configuration overrides.
10+
# To override a setting, go to a specific file, uncomment a setting and provide a value.
11+
include "network.conf"
12+
include "storage.conf"
13+
include "blockchain.conf"
14+
include "sync.conf"
15+
include "misc.conf"
16+
17+
# Uncomment the following include to connect to the testnet Morden.
18+
# Note that any settings in this file will override the ones defined in the files above
19+
# include "morden.conf"

src/universal/conf/misc.conf

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
mantis {
2-
txPool {
3-
# Maximum number of pending transaction kept in the pool
4-
# tx-pool-size = 1000
5-
}
6-
7-
mining {
8-
# Maximum number of ommers kept in the pool
9-
# ommers-pool-size = 30
10-
11-
# This determines how many parallel eth_getWork request we can handle, by storing the prepared blocks in a cache,
12-
# until a corresponding eth_submitWork request is received
13-
# block-cashe-size = 30
14-
15-
# Miner's coinbase address
16-
# coinbase = "0011223344556677889900112233445566778899"
17-
}
18-
19-
filter {
20-
# Time at which a filter remains valid
21-
# filter-timeout = 10.minutes
22-
}
23-
}
1+
mantis {
2+
txPool {
3+
# Maximum number of pending transaction kept in the pool
4+
# tx-pool-size = 1000
5+
}
6+
7+
mining {
8+
# Maximum number of ommers kept in the pool
9+
# ommers-pool-size = 30
10+
11+
# This determines how many parallel eth_getWork request we can handle, by storing the prepared blocks in a cache,
12+
# until a corresponding eth_submitWork request is received
13+
# block-cashe-size = 30
14+
15+
# Miner's coinbase address
16+
# coinbase = "0011223344556677889900112233445566778899"
17+
}
18+
19+
filter {
20+
# Time at which a filter remains valid
21+
# filter-timeout = 10.minutes
22+
}
23+
}

src/universal/conf/morden.conf

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
mantis {
2-
network {
3-
discovery.bootstrap-nodes = [
4-
"enode://e731347db0521f3476e6bbbb83375dcd7133a1601425ebd15fd10f3835fd4c304fba6282087ca5a0deeafadf0aa0d4fd56c3323331901c1f38bd181c283e3e35@128.199.55.137:30303",
5-
"enode://ceb5c0f85eb994dbe9693bf46d99b03f6b838d17cc74e68d5eb003171ff39e5f120b17f965b267c319303f94d80b9d994b77062fb1486d76ce95d9f3d8fe1cb4@46.101.122.141:30303",
6-
"enode://fb28713820e718066a2f5df6250ae9d07cff22f672dbf26be6c75d088f821a9ad230138ba492c533a80407d054b1436ef18e951bb65e6901553516c8dffe8ff0@104.155.176.151:30304",
7-
"enode://afdc6076b9bf3e7d3d01442d6841071e84c76c73a7016cb4f35c0437df219db38565766234448f1592a07ba5295a867f0ce87b359bf50311ed0b830a2361392d@104.154.136.117:30403",
8-
"enode://21101a9597b79e933e17bc94ef3506fe99a137808907aa8fefa67eea4b789792ad11fb391f38b00087f8800a2d3dff011572b62a31232133dd1591ac2d1502c8@104.198.71.200:30403"
9-
]
10-
11-
peer.network-id = 2
12-
}
13-
14-
blockchain {
15-
frontier-block-number = "0"
16-
homestead-block-number = "494000"
17-
eip150-block-number = "1783000"
18-
eip155-block-number = "1915000"
19-
eip160-block-number = "1915000"
20-
difficulty-bomb-pause-block-number = "1915000"
21-
difficulty-bomb-continue-block-number = "3415000"
22-
23-
dao-fork-block-number = "1783000"
24-
dao-fork-block-hash = "f376243aeff1f256d970714c3de9fd78fa4e63cf63e32a51fe1169e375d98145"
25-
26-
account-start-nonce = "1048576"
27-
28-
chain-id = "3e"
29-
30-
custom-genesis-file = "conf/morden.json"
31-
}
32-
}
1+
mantis {
2+
network {
3+
discovery.bootstrap-nodes = [
4+
"enode://e731347db0521f3476e6bbbb83375dcd7133a1601425ebd15fd10f3835fd4c304fba6282087ca5a0deeafadf0aa0d4fd56c3323331901c1f38bd181c283e3e35@128.199.55.137:30303",
5+
"enode://ceb5c0f85eb994dbe9693bf46d99b03f6b838d17cc74e68d5eb003171ff39e5f120b17f965b267c319303f94d80b9d994b77062fb1486d76ce95d9f3d8fe1cb4@46.101.122.141:30303",
6+
"enode://fb28713820e718066a2f5df6250ae9d07cff22f672dbf26be6c75d088f821a9ad230138ba492c533a80407d054b1436ef18e951bb65e6901553516c8dffe8ff0@104.155.176.151:30304",
7+
"enode://afdc6076b9bf3e7d3d01442d6841071e84c76c73a7016cb4f35c0437df219db38565766234448f1592a07ba5295a867f0ce87b359bf50311ed0b830a2361392d@104.154.136.117:30403",
8+
"enode://21101a9597b79e933e17bc94ef3506fe99a137808907aa8fefa67eea4b789792ad11fb391f38b00087f8800a2d3dff011572b62a31232133dd1591ac2d1502c8@104.198.71.200:30403"
9+
]
10+
11+
peer.network-id = 2
12+
}
13+
14+
blockchain {
15+
frontier-block-number = "0"
16+
homestead-block-number = "494000"
17+
eip150-block-number = "1783000"
18+
eip155-block-number = "1915000"
19+
eip160-block-number = "1915000"
20+
difficulty-bomb-pause-block-number = "1915000"
21+
difficulty-bomb-continue-block-number = "3415000"
22+
23+
dao-fork-block-number = "1783000"
24+
dao-fork-block-hash = "f376243aeff1f256d970714c3de9fd78fa4e63cf63e32a51fe1169e375d98145"
25+
26+
account-start-nonce = "1048576"
27+
28+
chain-id = "3e"
29+
30+
custom-genesis-file = "conf/morden.json"
31+
}
32+
}

0 commit comments

Comments
 (0)