-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[P2P] Refactor/consolidate P2P modules #576
Changes from 86 commits
337ee8f
206b647
d8e6fa5
09f4ac8
ec98ead
6f159c0
e5c43f1
00c7f2b
6d20681
b16d2d0
c5c767e
bd950af
10aa7d9
304c4cd
2d65acc
d0c881e
499f97e
177f1c1
498229a
b757af8
2770f41
1e120cb
8bf12e7
a981bf0
311d7fc
a97dbb1
e060ba7
957ebbb
b89fc48
a188138
c42412e
343c7cf
8cd52c7
b7c690d
f78bd39
0e2a1d5
7ca40de
3b6253e
111ae0a
4b3f1c0
bd278b2
a26e641
dab3215
b2f0cd0
f094347
e2ec506
67ae3c7
5d625d8
024ce95
f87722c
a4f4357
c09aa70
348a698
8249db9
e08f024
4207744
c761647
2585196
3f82c0d
2185906
55c8a66
9d68e1d
41ddffd
4cf437d
bb07e7e
c869310
b74d289
a449d37
6bb54ae
9573730
5be78e6
e1f9c50
847409b
39d16cd
10f3117
7033668
c7aaeb0
df787e4
fe0b979
517b940
cf140ab
55123e2
d8187ce
b09e98c
c3f9255
7e9343b
b99e81c
09d173a
1668e11
90cf45e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -76,6 +76,10 @@ spec: | |||
# Any host that is visible and connected to the cluster can be arbitrarily selected as the RPC host | ||||
- name: RPC_HOST | ||||
value: pocket-validators | ||||
# TECHDEBT(#678): debug client requires hostname to participate | ||||
# in P2P networking. | ||||
- name: POCKET_P2P_HOSTNAME | ||||
value: "127.0.0.1" | ||||
Comment on lines
+81
to
+82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added this to resolve this error when using the debug cli in the tilt localnet (however, the value isn't actually used by the debug CLI):
I read this as, it tried to resolve DNS for an empty string I hypothesize that the reason this is necessary in tilt and not in docker compose is because the config manifest has - name: POCKET_P2P_IS_EMPTY_CONNECTION_TYPE
value: "true" (Thoughts on this one @okdas?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bryanchriswhite I think you don't see that behavior on docker-compose because by default CLI uses pocket/app/client/cli/debug.go Line 80 in 39d16cd
Which has node1.consensus set as a hostname.
I need to look deeper to figure out why it tries to resolve the empty host string when the value is I think requiring such parameters (hostname, Postgres, etc.) is counterintuitive when the user only needs to use CLI. In the current v0 world, users often use CLI to query pocket RPC endpoints to get the latest height, information about nodes, etc. We definitely should not require unnecessary configs. I'll see if such a ticket exists to add more information or create a new one tomorrow. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @okdas Apologies for any confusion, to be clear, setting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment added: # TECHDEBT(#678): debug client requires hostname to participate
# in P2P networking.
- name: POCKET_P2P_HOSTNAME
value: "127.0.0.1"
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||||
volumeMounts: | ||||
# IMPROVE: should probably go in /etc/pocket and have Viper read from there as a default path | ||||
- mountPath: /var/pocket/config | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,10 @@ spec: | |
"until nc -z $(POSTGRES_HOST) $(POSTGRES_PORT); do echo waiting for postgres...; sleep 2; done;", | ||
] | ||
env: | ||
- name: POCKET_P2P_HOSTNAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
Comment on lines
+38
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-applying bb07e7e |
||
- name: POSTGRES_HOST | ||
value: {{ include "pocket-validator.postgresqlHost" . }} | ||
- name: POSTGRES_PORT | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,6 @@ privateKeySecretKeyRef: | |
config: | ||
root_directory: "/go/src/github.com/pocket-network" | ||
private_key: "" # @ignored This value is needed but ignored - use privateKeySecretKeyRef instead | ||
use_libp2p: false | ||
consensus: | ||
max_mempool_bytes: 500000000 | ||
pacemaker_config: | ||
|
@@ -93,6 +92,7 @@ config: | |
max_conn_idle_time: 1m | ||
health_check_period: 30s | ||
p2p: | ||
hostname: "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-applying #576 (comment) in the helm values. |
||
port: 42069 | ||
use_rain_tree: true | ||
is_empty_connection_type: false | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: While
mod
's interface does define#Start()
, it does not define other members ofmodules.P2Pmodule
(e.g.#Send()
) which are called on the global varp2pMod
in other functions in this module.