Skip to content

Commit 3cae426

Browse files
committed
flags: fix discovery port hint text (30303 -> 32110)
1 parent 6ab354d commit 3cae426

File tree

16 files changed

+137
-135
lines changed

16 files changed

+137
-135
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ FROM alpine:latest
2222
RUN apk add --no-cache ca-certificates
2323
COPY --from=builder /parallax/build/bin/prlx /usr/local/bin/
2424

25-
EXPOSE 8545 8546 30303 30303/udp
25+
EXPOSE 8545 8546 32110 32110/udp
2626
ENTRYPOINT ["prlx"]
2727

2828
# Add some metadata labels to help programatic image consumption

Dockerfile.alltools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ FROM alpine:latest
2222
RUN apk add --no-cache ca-certificates
2323
COPY --from=builder /parallax/build/bin/* /usr/local/bin/
2424

25-
EXPOSE 8545 8546 30303 30303/udp
25+
EXPOSE 8545 8546 32110 32110/udp
2626

2727
# Add some metadata labels to help programatic image consumption
2828
ARG COMMIT=""

build/nsis.install.nsh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ Section "Prlx" PRLX_IDX
2424
createShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
2525

2626
# Firewall - remove rules (if exists)
27-
SimpleFC::AdvRemoveRule "Prlx incoming peers (TCP:30303)"
28-
SimpleFC::AdvRemoveRule "Prlx outgoing peers (TCP:30303)"
29-
SimpleFC::AdvRemoveRule "Prlx UDP discovery (UDP:30303)"
27+
SimpleFC::AdvRemoveRule "Prlx incoming peers (TCP:32110)"
28+
SimpleFC::AdvRemoveRule "Prlx outgoing peers (TCP:32110)"
29+
SimpleFC::AdvRemoveRule "Prlx UDP discovery (UDP:32110)"
3030

3131
# Firewall - add rules
32-
SimpleFC::AdvAddRule "Prlx incoming peers (TCP:30303)" "" 6 1 1 2147483647 1 "$INSTDIR\prlx.exe" "" "" "Parallax" 30303 "" "" ""
33-
SimpleFC::AdvAddRule "Prlx outgoing peers (TCP:30303)" "" 6 2 1 2147483647 1 "$INSTDIR\prlx.exe" "" "" "Parallax" "" 30303 "" ""
34-
SimpleFC::AdvAddRule "Prlx UDP discovery (UDP:30303)" "" 17 2 1 2147483647 1 "$INSTDIR\prlx.exe" "" "" "Parallax" "" 30303 "" ""
32+
SimpleFC::AdvAddRule "Prlx incoming peers (TCP:32110)" "" 6 1 1 2147483647 1 "$INSTDIR\prlx.exe" "" "" "Parallax" 32110 "" "" ""
33+
SimpleFC::AdvAddRule "Prlx outgoing peers (TCP:32110)" "" 6 2 1 2147483647 1 "$INSTDIR\prlx.exe" "" "" "Parallax" "" 32110 "" ""
34+
SimpleFC::AdvAddRule "Prlx UDP discovery (UDP:32110)" "" 17 2 1 2147483647 1 "$INSTDIR\prlx.exe" "" "" "Parallax" "" 32110 "" ""
3535

3636
# Set default IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
3737
${EnvVarUpdate} $0 "PARALLAX_SOCKET" "R" "HKLM" "\\.\pipe\prlx.ipc"

build/nsis.uninstall.nsh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Section "Uninstall"
1717
rmDir "$SMPROGRAMS\${APPNAME}"
1818

1919
# Firewall - remove rules if exists
20-
SimpleFC::AdvRemoveRule "Prlx incoming peers (TCP:30303)"
21-
SimpleFC::AdvRemoveRule "Prlx outgoing peers (TCP:30303)"
22-
SimpleFC::AdvRemoveRule "Prlx UDP discovery (UDP:30303)"
20+
SimpleFC::AdvRemoveRule "Prlx incoming peers (TCP:32110)"
21+
SimpleFC::AdvRemoveRule "Prlx outgoing peers (TCP:32110)"
22+
SimpleFC::AdvRemoveRule "Prlx UDP discovery (UDP:32120)"
2323

2424
# Remove IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
2525
${un.EnvVarUpdate} $0 "PARALLAX_SOCKET" "R" "HKLM" "\\.\pipe\prlx.ipc"

cmd/devp2p/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The `devp2p key ...` command family deals with node key files.
1313

1414
Run `devp2p key generate mynode.key` to create a new node key in the `mynode.key` file.
1515

16-
Run `devp2p key to-enode mynode.key -ip 127.0.0.1 -tcp 30303` to create an enode:// URL
16+
Run `devp2p key to-enode mynode.key -ip 127.0.0.1 -tcp 32110` to create an enode:// URL
1717
corresponding to the given node key and address information.
1818

1919
### Maintaining DNS Discovery Node Lists

cmd/devp2p/internal/v4test/discv4tests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ func UnsolicitedNeighbors(t *utesting.T) {
331331
Nodes: []v4wire.Node{{
332332
ID: encFakeKey,
333333
IP: net.IP{1, 2, 3, 4},
334-
UDP: 30303,
335-
TCP: 30303,
334+
UDP: 32110,
335+
TCP: 32110,
336336
}},
337337
}
338338
te.send(te.l1, &neighbors)

cmd/devp2p/internal/v4test/framework.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ func newTestEnv(remote string, listen1, listen2 string) *testenv {
6060
ip = net.ParseIP("127.0.0.1")
6161
}
6262
if tcpPort = node.TCP(); tcpPort == 0 {
63-
tcpPort = 30303
63+
tcpPort = 32110
6464
}
6565
if udpPort = node.TCP(); udpPort == 0 {
66-
udpPort = 30303
66+
udpPort = 32110
6767
}
6868
node = enode.NewV4(node.Pubkey(), ip, tcpPort, udpPort)
6969
}

cmd/devp2p/keycmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ var (
5858
tcpPortFlag = cli.IntFlag{
5959
Name: "tcp",
6060
Usage: "TCP port of the node",
61-
Value: 30303,
61+
Value: 32110,
6262
}
6363
udpPortFlag = cli.IntFlag{
6464
Name: "udp",
6565
Usage: "UDP port of the node",
66-
Value: 30303,
66+
Value: 32110,
6767
}
6868
)
6969

cmd/utils/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ var (
653653
ListenPortFlag = cli.IntFlag{
654654
Name: "port",
655655
Usage: "Network listening port",
656-
Value: 30303,
656+
Value: 32110,
657657
}
658658
BootnodesFlag = cli.StringFlag{
659659
Name: "bootnodes",

p2p/dial_test.go

Lines changed: 74 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ func TestDialSchedDynDial(t *testing.T) {
5252
{flags: dynDialedConn, node: newNode(uintID(0x02), "")},
5353
},
5454
discovered: []*enode.Node{
55-
newNode(uintID(0x00), "127.0.0.1:30303"), // not dialed because already connected as static peer
56-
newNode(uintID(0x02), "127.0.0.1:30303"), // ...
57-
newNode(uintID(0x03), "127.0.0.1:30303"),
58-
newNode(uintID(0x04), "127.0.0.1:30303"),
59-
newNode(uintID(0x05), "127.0.0.1:30303"), // not dialed because there are only two slots
60-
newNode(uintID(0x06), "127.0.0.1:30303"), // ...
61-
newNode(uintID(0x07), "127.0.0.1:30303"), // ...
62-
newNode(uintID(0x08), "127.0.0.1:30303"), // ...
55+
newNode(uintID(0x00), "127.0.0.1:32110"), // not dialed because already connected as static peer
56+
newNode(uintID(0x02), "127.0.0.1:32110"), // ...
57+
newNode(uintID(0x03), "127.0.0.1:32110"),
58+
newNode(uintID(0x04), "127.0.0.1:32110"),
59+
newNode(uintID(0x05), "127.0.0.1:32110"), // not dialed because there are only two slots
60+
newNode(uintID(0x06), "127.0.0.1:32110"), // ...
61+
newNode(uintID(0x07), "127.0.0.1:32110"), // ...
62+
newNode(uintID(0x08), "127.0.0.1:32110"), // ...
6363
},
6464
wantNewDials: []*enode.Node{
65-
newNode(uintID(0x03), "127.0.0.1:30303"),
66-
newNode(uintID(0x04), "127.0.0.1:30303"),
65+
newNode(uintID(0x03), "127.0.0.1:32110"),
66+
newNode(uintID(0x04), "127.0.0.1:32110"),
6767
},
6868
},
6969

@@ -73,7 +73,7 @@ func TestDialSchedDynDial(t *testing.T) {
7373
uintID(0x04),
7474
},
7575
wantNewDials: []*enode.Node{
76-
newNode(uintID(0x05), "127.0.0.1:30303"),
76+
newNode(uintID(0x05), "127.0.0.1:32110"),
7777
},
7878
},
7979

@@ -86,7 +86,7 @@ func TestDialSchedDynDial(t *testing.T) {
8686
uintID(0x05),
8787
},
8888
discovered: []*enode.Node{
89-
newNode(uintID(0x09), "127.0.0.1:30303"), // not dialed because there are no free slots
89+
newNode(uintID(0x09), "127.0.0.1:32110"), // not dialed because there are no free slots
9090
},
9191
},
9292

@@ -99,18 +99,18 @@ func TestDialSchedDynDial(t *testing.T) {
9999
uintID(0x02),
100100
},
101101
discovered: []*enode.Node{
102-
newNode(uintID(0x0a), "127.0.0.1:30303"),
103-
newNode(uintID(0x0b), "127.0.0.1:30303"),
104-
newNode(uintID(0x0c), "127.0.0.1:30303"),
105-
newNode(uintID(0x0d), "127.0.0.1:30303"),
106-
newNode(uintID(0x0f), "127.0.0.1:30303"),
102+
newNode(uintID(0x0a), "127.0.0.1:32110"),
103+
newNode(uintID(0x0b), "127.0.0.1:32110"),
104+
newNode(uintID(0x0c), "127.0.0.1:32110"),
105+
newNode(uintID(0x0d), "127.0.0.1:32110"),
106+
newNode(uintID(0x0f), "127.0.0.1:32110"),
107107
},
108108
wantNewDials: []*enode.Node{
109-
newNode(uintID(0x06), "127.0.0.1:30303"),
110-
newNode(uintID(0x07), "127.0.0.1:30303"),
111-
newNode(uintID(0x08), "127.0.0.1:30303"),
112-
newNode(uintID(0x09), "127.0.0.1:30303"),
113-
newNode(uintID(0x0a), "127.0.0.1:30303"),
109+
newNode(uintID(0x06), "127.0.0.1:32110"),
110+
newNode(uintID(0x07), "127.0.0.1:32110"),
111+
newNode(uintID(0x08), "127.0.0.1:32110"),
112+
newNode(uintID(0x09), "127.0.0.1:32110"),
113+
newNode(uintID(0x0a), "127.0.0.1:32110"),
114114
},
115115
},
116116
})
@@ -121,14 +121,14 @@ func TestDialSchedNetRestrict(t *testing.T) {
121121
t.Parallel()
122122

123123
nodes := []*enode.Node{
124-
newNode(uintID(0x01), "127.0.0.1:30303"),
125-
newNode(uintID(0x02), "127.0.0.2:30303"),
126-
newNode(uintID(0x03), "127.0.0.3:30303"),
127-
newNode(uintID(0x04), "127.0.0.4:30303"),
128-
newNode(uintID(0x05), "127.0.2.5:30303"),
129-
newNode(uintID(0x06), "127.0.2.6:30303"),
130-
newNode(uintID(0x07), "127.0.2.7:30303"),
131-
newNode(uintID(0x08), "127.0.2.8:30303"),
124+
newNode(uintID(0x01), "127.0.0.1:32110"),
125+
newNode(uintID(0x02), "127.0.0.2:32110"),
126+
newNode(uintID(0x03), "127.0.0.3:32110"),
127+
newNode(uintID(0x04), "127.0.0.4:32110"),
128+
newNode(uintID(0x05), "127.0.2.5:32110"),
129+
newNode(uintID(0x06), "127.0.2.6:32110"),
130+
newNode(uintID(0x07), "127.0.2.7:32110"),
131+
newNode(uintID(0x08), "127.0.2.8:32110"),
132132
}
133133
config := dialConfig{
134134
netRestrict: new(netutil.Netlist),
@@ -165,28 +165,28 @@ func TestDialSchedStaticDial(t *testing.T) {
165165
// aren't yet connected.
166166
{
167167
peersAdded: []*conn{
168-
{flags: dynDialedConn, node: newNode(uintID(0x01), "127.0.0.1:30303")},
169-
{flags: dynDialedConn, node: newNode(uintID(0x02), "127.0.0.2:30303")},
168+
{flags: dynDialedConn, node: newNode(uintID(0x01), "127.0.0.1:32110")},
169+
{flags: dynDialedConn, node: newNode(uintID(0x02), "127.0.0.2:32110")},
170170
},
171171
update: func(d *dialScheduler) {
172172
// These two are not dialed because they're already connected
173173
// as dynamic peers.
174-
d.addStatic(newNode(uintID(0x01), "127.0.0.1:30303"))
175-
d.addStatic(newNode(uintID(0x02), "127.0.0.2:30303"))
174+
d.addStatic(newNode(uintID(0x01), "127.0.0.1:32110"))
175+
d.addStatic(newNode(uintID(0x02), "127.0.0.2:32110"))
176176
// These nodes will be dialed:
177-
d.addStatic(newNode(uintID(0x03), "127.0.0.3:30303"))
178-
d.addStatic(newNode(uintID(0x04), "127.0.0.4:30303"))
179-
d.addStatic(newNode(uintID(0x05), "127.0.0.5:30303"))
180-
d.addStatic(newNode(uintID(0x06), "127.0.0.6:30303"))
181-
d.addStatic(newNode(uintID(0x07), "127.0.0.7:30303"))
182-
d.addStatic(newNode(uintID(0x08), "127.0.0.8:30303"))
183-
d.addStatic(newNode(uintID(0x09), "127.0.0.9:30303"))
177+
d.addStatic(newNode(uintID(0x03), "127.0.0.3:32110"))
178+
d.addStatic(newNode(uintID(0x04), "127.0.0.4:32110"))
179+
d.addStatic(newNode(uintID(0x05), "127.0.0.5:32110"))
180+
d.addStatic(newNode(uintID(0x06), "127.0.0.6:32110"))
181+
d.addStatic(newNode(uintID(0x07), "127.0.0.7:32110"))
182+
d.addStatic(newNode(uintID(0x08), "127.0.0.8:32110"))
183+
d.addStatic(newNode(uintID(0x09), "127.0.0.9:32110"))
184184
},
185185
wantNewDials: []*enode.Node{
186-
newNode(uintID(0x03), "127.0.0.3:30303"),
187-
newNode(uintID(0x04), "127.0.0.4:30303"),
188-
newNode(uintID(0x05), "127.0.0.5:30303"),
189-
newNode(uintID(0x06), "127.0.0.6:30303"),
186+
newNode(uintID(0x03), "127.0.0.3:32110"),
187+
newNode(uintID(0x04), "127.0.0.4:32110"),
188+
newNode(uintID(0x05), "127.0.0.5:32110"),
189+
newNode(uintID(0x06), "127.0.0.6:32110"),
190190
},
191191
},
192192
// Dial to 0x03 completes, filling a peer slot. One slot remains,
@@ -206,21 +206,21 @@ func TestDialSchedStaticDial(t *testing.T) {
206206
uintID(0x06): nil,
207207
},
208208
wantNewDials: []*enode.Node{
209-
newNode(uintID(0x08), "127.0.0.8:30303"),
210-
newNode(uintID(0x09), "127.0.0.9:30303"),
209+
newNode(uintID(0x08), "127.0.0.8:32110"),
210+
newNode(uintID(0x09), "127.0.0.9:32110"),
211211
},
212212
},
213213
// Peer 0x01 drops and 0x07 connects as inbound peer.
214214
// Only 0x01 is dialed.
215215
{
216216
peersAdded: []*conn{
217-
{flags: inboundConn, node: newNode(uintID(0x07), "127.0.0.7:30303")},
217+
{flags: inboundConn, node: newNode(uintID(0x07), "127.0.0.7:32110")},
218218
},
219219
peersRemoved: []enode.ID{
220220
uintID(0x01),
221221
},
222222
wantNewDials: []*enode.Node{
223-
newNode(uintID(0x01), "127.0.0.1:30303"),
223+
newNode(uintID(0x01), "127.0.0.1:32110"),
224224
},
225225
},
226226
})
@@ -238,12 +238,12 @@ func TestDialSchedRemoveStatic(t *testing.T) {
238238
// Add static nodes.
239239
{
240240
update: func(d *dialScheduler) {
241-
d.addStatic(newNode(uintID(0x01), "127.0.0.1:30303"))
242-
d.addStatic(newNode(uintID(0x02), "127.0.0.2:30303"))
243-
d.addStatic(newNode(uintID(0x03), "127.0.0.3:30303"))
241+
d.addStatic(newNode(uintID(0x01), "127.0.0.1:32110"))
242+
d.addStatic(newNode(uintID(0x02), "127.0.0.2:32110"))
243+
d.addStatic(newNode(uintID(0x03), "127.0.0.3:32110"))
244244
},
245245
wantNewDials: []*enode.Node{
246-
newNode(uintID(0x01), "127.0.0.1:30303"),
246+
newNode(uintID(0x01), "127.0.0.1:32110"),
247247
},
248248
},
249249
// Dial to 0x01 fails.
@@ -255,16 +255,16 @@ func TestDialSchedRemoveStatic(t *testing.T) {
255255
uintID(0x01): nil,
256256
},
257257
wantNewDials: []*enode.Node{
258-
newNode(uintID(0x02), "127.0.0.2:30303"),
258+
newNode(uintID(0x02), "127.0.0.2:32110"),
259259
},
260260
},
261261
// All static nodes are removed. 0x01 is in history, 0x02 is being
262262
// dialed, 0x03 is in staticPool.
263263
{
264264
update: func(d *dialScheduler) {
265-
d.removeStatic(newNode(uintID(0x01), "127.0.0.1:30303"))
266-
d.removeStatic(newNode(uintID(0x02), "127.0.0.2:30303"))
267-
d.removeStatic(newNode(uintID(0x03), "127.0.0.3:30303"))
265+
d.removeStatic(newNode(uintID(0x01), "127.0.0.1:32110"))
266+
d.removeStatic(newNode(uintID(0x02), "127.0.0.2:32110"))
267+
d.removeStatic(newNode(uintID(0x03), "127.0.0.3:32110"))
268268
},
269269
failed: []enode.ID{
270270
uintID(0x02),
@@ -274,7 +274,9 @@ func TestDialSchedRemoveStatic(t *testing.T) {
274274
},
275275
},
276276
// Since all static nodes are removed, they should not be dialed again.
277-
{}, {}, {},
277+
{},
278+
{},
279+
{},
278280
})
279281
}
280282

@@ -291,7 +293,7 @@ func TestDialSchedManyStaticNodes(t *testing.T) {
291293
},
292294
update: func(d *dialScheduler) {
293295
for id := uint16(0); id < 2000; id++ {
294-
n := newNode(uintID(id), "127.0.0.1:30303")
296+
n := newNode(uintID(id), "127.0.0.1:32110")
295297
d.addStatic(n)
296298
}
297299
},
@@ -302,10 +304,10 @@ func TestDialSchedManyStaticNodes(t *testing.T) {
302304
uintID(0xFFFF),
303305
},
304306
wantNewDials: []*enode.Node{
305-
newNode(uintID(0x0085), "127.0.0.1:30303"),
306-
newNode(uintID(0x02dc), "127.0.0.1:30303"),
307-
newNode(uintID(0x0285), "127.0.0.1:30303"),
308-
newNode(uintID(0x00cb), "127.0.0.1:30303"),
307+
newNode(uintID(0x0085), "127.0.0.1:32110"),
308+
newNode(uintID(0x02dc), "127.0.0.1:32110"),
309+
newNode(uintID(0x0285), "127.0.0.1:32110"),
310+
newNode(uintID(0x00cb), "127.0.0.1:32110"),
309311
},
310312
},
311313
})
@@ -322,14 +324,14 @@ func TestDialSchedHistory(t *testing.T) {
322324
runDialTest(t, config, []dialTestRound{
323325
{
324326
update: func(d *dialScheduler) {
325-
d.addStatic(newNode(uintID(0x01), "127.0.0.1:30303"))
326-
d.addStatic(newNode(uintID(0x02), "127.0.0.2:30303"))
327-
d.addStatic(newNode(uintID(0x03), "127.0.0.3:30303"))
327+
d.addStatic(newNode(uintID(0x01), "127.0.0.1:32110"))
328+
d.addStatic(newNode(uintID(0x02), "127.0.0.2:32110"))
329+
d.addStatic(newNode(uintID(0x03), "127.0.0.3:32110"))
328330
},
329331
wantNewDials: []*enode.Node{
330-
newNode(uintID(0x01), "127.0.0.1:30303"),
331-
newNode(uintID(0x02), "127.0.0.2:30303"),
332-
newNode(uintID(0x03), "127.0.0.3:30303"),
332+
newNode(uintID(0x01), "127.0.0.1:32110"),
333+
newNode(uintID(0x02), "127.0.0.2:32110"),
334+
newNode(uintID(0x03), "127.0.0.3:32110"),
333335
},
334336
},
335337
// No new tasks are launched in this round because all static
@@ -352,7 +354,7 @@ func TestDialSchedHistory(t *testing.T) {
352354
// The cache entry for node 0x03 has expired and is retried.
353355
{
354356
wantNewDials: []*enode.Node{
355-
newNode(uintID(0x03), "127.0.0.3:30303"),
357+
newNode(uintID(0x03), "127.0.0.3:32110"),
356358
},
357359
},
358360
})
@@ -366,8 +368,8 @@ func TestDialSchedResolve(t *testing.T) {
366368
maxDialPeers: 1,
367369
}
368370
node := newNode(uintID(0x01), "")
369-
resolved := newNode(uintID(0x01), "127.0.0.1:30303")
370-
resolved2 := newNode(uintID(0x01), "127.0.0.55:30303")
371+
resolved := newNode(uintID(0x01), "127.0.0.1:32110")
372+
resolved2 := newNode(uintID(0x01), "127.0.0.55:32110")
371373
runDialTest(t, config, []dialTestRound{
372374
{
373375
update: func(d *dialScheduler) {

0 commit comments

Comments
 (0)