Skip to content

Commit 62d4a77

Browse files
author
lemastero
committed
Merge branch 'develop' into update_libraries
2 parents c7570f1 + 39f3fb1 commit 62d4a77

28 files changed

+244
-1544
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ The latest release can be downloaded from [here](https://github.com/input-output
1717

1818
### Command line version
1919

20-
Depending on network you want to join you can use appropriate launcher, all can be found in `bin` directory:
21-
- `mantis-etc` - for joining Ethereum Classic network
22-
- `mantis-eth` - for joining Ethereum
20+
You can use generic launcher with appropriate parameter to connect with pre-configured network, it can be found in `bin` directory.
21+
22+
Example:
23+
- `./bin/mantis-launcher etc` - for joining Ethereum Classic network
24+
25+
Possible networks: `etc`, `eth`, `mordor`, `testnet-internal`
2326

2427
### Building the client
2528

src/main/resources/application.conf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ mantis {
242242
# If false then that 20% gets burned
243243
# Doesn't have any effect is ecip1098 is not yet activated
244244
treasury-opt-out = false
245+
245246
}
246247

247248
# This is the section dedicated to Ethash mining.
@@ -290,7 +291,7 @@ mantis {
290291

291292
# Retry interval for resuming fast sync after all connections to peers were lost
292293
# Also retry interval in regular sync: for picking blocks batch and retrying requests
293-
sync-retry-interval = 15.seconds
294+
sync-retry-interval = 0.5 seconds
294295

295296
# Response time-out from peer during sync. If a peer fails to respond within this limit, it will be blacklisted
296297
peer-response-timeout = 3.minutes
@@ -324,7 +325,7 @@ mantis {
324325

325326
# During fast-sync when most up to date block is determined from peers, the actual target block number
326327
# will be decreased by this value
327-
target-block-offset = 500
328+
target-block-offset = 128
328329

329330
# How often to query peers for new blocks after the top of the chain has been reached
330331
check-for-new-block-interval = 10.seconds
@@ -334,7 +335,7 @@ mantis {
334335
fastsync-block-chain-only-peers-pool = 100
335336

336337
# time between 2 consecutive requests to peer when doing fast sync, this is to prevent flagging us as spammer
337-
fastsync-throttle = 0.3 seconds
338+
fastsync-throttle = 0.1 seconds
338339

339340
# When we receive a branch that is not rooted in our chain (we don't have a parent for the first header), it means
340341
# we found a fork. To resolve it, we need to query the same peer for previous headers, to find a common ancestor.
@@ -387,8 +388,6 @@ mantis {
387388
# Sets max number of blocks that can be stored in queue to import on fetcher side
388389
# Warning! This setting affects ability to go back in case of branch resolution so it should not be too low
389390
max-fetcher-queue-size = 1000
390-
391-
use-new-regular-sync = true
392391
}
393392

394393
pruning {

src/main/resources/chains/etc-chain.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,7 @@
154154
"enode://715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8@52.231.165.108:30303", // bootnode-azure-koreasouth-001
155155
"enode://5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f@104.42.217.25:30303" // bootnode-azure-westus-001
156156
]
157+
158+
# List of hex encoded public keys of Checkpoint Authorities
159+
checkpoint-public-keys = []
157160
}

src/main/resources/chains/testnet-internal-chain.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,7 @@
127127

128128
# Set of initial nodes
129129
bootstrap-nodes = []
130+
131+
# List of hex encoded public keys of Checkpoint Authorities
132+
checkpoint-public-keys = []
130133
}

src/main/scala/io/iohk/ethereum/blockchain/sync/FastSync.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@ class FastSync(
604604
if (assignedHandlers.nonEmpty) {
605605
log.debug("There are no available peers, waiting for responses")
606606
} else {
607-
log.debug("There are no peers to download from, scheduling a retry in {}", syncRetryInterval)
608607
scheduler.scheduleOnce(syncRetryInterval, self, ProcessSyncing)
609608
}
610609
} else {

src/main/scala/io/iohk/ethereum/blockchain/sync/SyncController.scala

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.iohk.ethereum.blockchain.sync
22

33
import akka.actor.{Actor, ActorLogging, ActorRef, PoisonPill, Props, Scheduler}
4-
import io.iohk.ethereum.blockchain.sync.regular.{OldRegularSync, RegularSync}
4+
import io.iohk.ethereum.blockchain.sync.regular.RegularSync
55
import io.iohk.ethereum.consensus.validators.Validators
66
import io.iohk.ethereum.db.storage.{AppStateStorage, FastSyncStateStorage}
77
import io.iohk.ethereum.domain.Blockchain
@@ -85,9 +85,7 @@ class SyncController(
8585
context become runningFastSync(fastSync)
8686
}
8787

88-
def startRegularSync(): Unit = if (syncConfig.useNewRegularSync) startNewRegularSync() else startOldRegularSync()
89-
90-
def startNewRegularSync(): Unit = {
88+
def startRegularSync(): Unit = {
9189
val peersClient = context.actorOf(PeersClient.props(etcPeerManager, peerEventBus, syncConfig, scheduler), "peers-client")
9290
val regularSync = context.actorOf(
9391
RegularSync.props(
@@ -100,29 +98,12 @@ class SyncController(
10098
ommersPool,
10199
pendingTransactionsManager,
102100
scheduler),
103-
"new-regular-sync"
101+
"regular-sync"
104102
)
105103
regularSync ! RegularSync.Start
106104
context become runningRegularSync(regularSync)
107105
}
108106

109-
def startOldRegularSync(): Unit = {
110-
val regularSync = context.actorOf(OldRegularSync.props(
111-
appStateStorage = appStateStorage,
112-
etcPeerManager = etcPeerManager,
113-
peerEventBus = peerEventBus,
114-
ommersPool = ommersPool,
115-
pendingTransactionsManager = pendingTransactionsManager,
116-
broadcaster = new BlockBroadcast(etcPeerManager, syncConfig),
117-
ledger = ledger,
118-
blockchain = blockchain,
119-
syncConfig = syncConfig,
120-
scheduler = scheduler
121-
), "old-regular-sync")
122-
123-
regularSync ! OldRegularSync.Start
124-
context become runningRegularSync(regularSync)
125-
}
126107
}
127108

128109
object SyncController {

0 commit comments

Comments
 (0)