js-libp2p-gossipsub
js-libp2p-gossipsub copied to clipboard
Consider synced flow when validating gossip messages
Motivation
Right now lodestar has "StrictNoSign" signature policy, and a synced msgIdFn, running synced version of "handleReceivedMessage" and "validateReceivedMessage" (hard-coded in node_modules) gives us some improvement in a contabo machine
-
Less dropped jobs - before 40 % in average, after >20% in average

-
p7 is down to -337 vs consistently 0

-
Thanks for that "min" peer score is almost 0

-
We need to write a benchmark to see if it's worth to implement a "syncedHandleReceivedMessage" flag
First we should quantify the cost of promises. This could lead to a lot of duplicate code and make the maintenance much more annoying. So we should have a big incentive to pursue it.
For context, validation is async because libp2p's sha256 is async. It's because they use the in-browser native crypto for browsers, which has an async API.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.