Skip to content

Commit 01031f2

Browse files
authored
Merge pull request #1031 from ethereumjs/client-network-improvements
Client Network Improvements
2 parents b88cf95 + 37e1721 commit 01031f2

File tree

3 files changed

+29
-13
lines changed

3 files changed

+29
-13
lines changed

packages/common/src/chains/goerli.json

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,25 +92,39 @@
9292
"comment": "Upstream bootnode 3"
9393
},
9494
{
95-
"ip": "52.64.155.147",
96-
"port": 30303,
97-
"id": "c1f8b7c2ac4453271fa07d8e9ecf9a2e8285aa0bd0c07df0131f47153306b0736fd3db8924e7a9bf0bed6b1d8d4f87362a71b033dc7c64547728d953e43e59b2",
95+
"ip": "18.218.250.66",
96+
"port": 30313,
97+
"id": "b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949",
9898
"location": "",
9999
"comment": "Upstream bootnode 4"
100100
},
101101
{
102-
"ip": "213.186.16.82",
102+
"ip": "3.11.147.67",
103103
"port": 30303,
104-
"id": "f4a9c6ee28586009fb5a96c8af13a58ed6d8315a9eee4772212c1d4d9cebe5a8b8a78ea4434f318726317d04a3f531a1ef0420cf9752605a562cfe858c46e263",
104+
"id": "a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91",
105105
"location": "",
106-
"comment": "Upstream bootnode 5"
106+
"comment": "Ethereum Foundation bootnode"
107107
},
108108
{
109-
"ip": "3.11.147.67",
109+
"ip": "51.15.116.226",
110110
"port": 30303,
111-
"id": "a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91",
111+
"id": "a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd",
112112
"location": "",
113-
"comment": "Ethereum Foundation bootnode"
113+
"comment": "Goerli Initiative bootnode"
114+
},
115+
{
116+
"ip": "51.15.119.157",
117+
"port": 30303,
118+
"id": "807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33",
119+
"location": "",
120+
"comment": "Goerli Initiative bootnode"
121+
},
122+
{
123+
"ip": "51.15.119.157",
124+
"port": 40303,
125+
"id": "a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd",
126+
"location": "",
127+
"comment": "Goerli Initiative bootnode"
114128
}
115129
]
116130
}

packages/devp2p/src/eth/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class ETH extends EventEmitter {
4141
// Set forkHash and nextForkBlock
4242
if (this._version >= 64) {
4343
const c = this._peer._common
44-
this._hardfork = c.hardfork() ? (c.hardfork() as string) : this._hardfork
44+
this._hardfork = c.hardfork() ? c.hardfork() : this._hardfork
4545
// Set latestBlock minimally to start block of fork to have some more
4646
// accurate basis if no latestBlock is provided along status send
4747
this._latestBlock = c.hardforkBlock(this._hardfork)
@@ -208,7 +208,7 @@ export class ETH extends EventEmitter {
208208
this._latestBlock = status.latestBlock
209209
}
210210
const forkHashB = Buffer.from(this._forkHash.substr(2), 'hex')
211-
const nextForkB = Buffer.from(this._nextForkBlock.toString(16), 'hex')
211+
const nextForkB = int2buffer(this._nextForkBlock)
212212
this._status.push([forkHashB, nextForkB])
213213
}
214214

packages/devp2p/src/rlpx/rlpx.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,12 @@ export class RLPx extends EventEmitter {
227227
peer.once('close', (reason, disconnectWe) => {
228228
if (disconnectWe) {
229229
debug(
230-
`disconnect from ${socket.remoteAddress}:${socket.remotePort}, reason: ${String(reason)}`
230+
`disconnect from ${socket.remoteAddress}:${socket.remotePort}, reason: ${DISCONNECT_REASONS[reason]}`
231231
)
232232
} else {
233-
debug(`${socket.remoteAddress}:${socket.remotePort} disconnect, reason: ${String(reason)}`)
233+
debug(
234+
`${socket.remoteAddress}:${socket.remotePort} disconnect, reason: ${DISCONNECT_REASONS[reason]}`
235+
)
234236
}
235237

236238
if (!disconnectWe && reason === DISCONNECT_REASONS.TOO_MANY_PEERS) {

0 commit comments

Comments
 (0)