Skip to content
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

v1.2.1: Low mesh peers due to p7 #4818

Closed
twoeths opened this issue Nov 27, 2022 · 9 comments
Closed

v1.2.1: Low mesh peers due to p7 #4818

twoeths opened this issue Nov 27, 2022 · 9 comments
Assignees
Labels
prio-high Resolve issues as soon as possible.

Comments

@twoeths
Copy link
Contributor

twoeths commented Nov 27, 2022

Describe the bug

Gossipsub score has been low since v1.2.1

Screen Shot 2022-11-27 at 12 54 15

Screen Shot 2022-11-27 at 12 55 03

due to P7

Screen Shot 2022-11-27 at 12 55 23

Expected behavior

Mesh peers should be the same to v1.1.0

@twoeths twoeths added the prio-high Resolve issues as soon as possible. label Nov 27, 2022
@twoeths
Copy link
Contributor Author

twoeths commented Nov 29, 2022

when I zoom in a range of 6h using 1m rate, it shows that if messages are delivered they're always within 6s. It means peers get penalties because they don't deliver messages they promise at all (or within 30s)?! Note that gossipsub delete tracked messages after 30s

Screen Shot 2022-11-29 at 08 38 23

Update: this metric is the same to v1.1.1

this is not likely an I/O lag issue

@twoeths twoeths self-assigned this Nov 29, 2022
@twoeths
Copy link
Contributor Author

twoeths commented Nov 29, 2022

lodestar v1.2.1 actually does not subscribe to all subnets (even with a node of >= 64 validators)

Screen Shot 2022-11-29 at 17 44 32

somehow a subnet topic is subscribed then unsubscribed all the times

Screen Shot 2022-11-29 at 17 45 35

@twoeths
Copy link
Contributor Author

twoeths commented Nov 29, 2022

Lodestar unsubscribe and then subscribe same subnet frequently

Nov-29 10:24:23.005[network]       ^[[36mverbose^[[39m: Unsubscribe to gossipsub topic topic=/eth2/4a26c58b/beacon_attestation_50/ssz_snappy
Nov-29 10:24:23.005[network]       ^[[36mverbose^[[39m: Unsubscribe to gossipsub topic topic=/eth2/4a26c58b/beacon_attestation_52/ssz_snappy
Nov-29 10:24:23.005[network]       ^[[36mverbose^[[39m: Subscribe to gossipsub topic topic=/eth2/4a26c58b/beacon_attestation_52/ssz_snappy
Nov-29 10:24:23.005[network]       ^[[36mverbose^[[39m: Subscribe to gossipsub topic topic=/eth2/4a26c58b/beacon_attestation_50/ssz_snappy

@twoeths
Copy link
Contributor Author

twoeths commented Nov 30, 2022

the gossipsub 4.1.1 unsubscribe()/leave() is async and not finished so it ignores the subscribe() call if we do it immediately https://github.com/ChainSafe/js-libp2p-gossipsub/blob/v4.1.1/src/index.ts#L1680

for the context, in gossipsub 0.14.1 leave() method is sync, that's why issue did not happen in lodestar v1.1.1 https://github.com/ChainSafe/js-libp2p-gossipsub/blob/v0.14.1/ts/index.ts#L1602

from lodestar side, it should not unsubscribe() then subscribe() immediately

@twoeths
Copy link
Contributor Author

twoeths commented Nov 30, 2022

Gossipsub broken promises on stable lg1k after we deploy v1.2 on Nov 09:

Screen Shot 2022-11-30 at 16 48 16

@wemeetagain
Copy link
Member

Take a look at the metrics on the latest libp2p branch. Seems p7 issue is resolved there

@twoeths
Copy link
Contributor Author

twoeths commented Dec 15, 2022

a lot of broken promises are due to the collision of fastMsgId function, i.e. 2 different messages have the same fastMsgId. Right now tracer ignores duplicate messages, we should also track them as delivered, see ChainSafe/js-libp2p-gossipsub#385

@wemeetagain
Copy link
Member

Resolved with v1.3.0

@twoeths
Copy link
Contributor Author

twoeths commented Jan 11, 2023

to be clear, this is fixed in curent unstable after libp2p is upgraded, so v1.4.0 not v1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio-high Resolve issues as soon as possible.
Projects
None yet
Development

No branches or pull requests

2 participants