Skip to content

Commit

Permalink
Call deliverMessage before gossip queue (#3812)
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion authored Feb 28, 2022
1 parent 62b2092 commit 4b62955
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/lodestar/src/network/gossip/gossipsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ export class Eth2Gossipsub extends Gossipsub {
*/
async validate(message: InMessage): Promise<void> {
try {
// Resolve IWANT promise before sending message to the queue. Attestations and aggregates can remain in the
// validation queue for > 1 min. Metrics show that peers are severly penalized with P7 due to broken promises,
// which they fullfil but _publish() is not called in time.
await this.gossipTracer.deliverMessage(message);

// messages must have a single topicID
const topicStr = Array.isArray(message.topicIDs) ? message.topicIDs[0] : undefined;

Expand Down

0 comments on commit 4b62955

Please sign in to comment.