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

fix: gossipsub seen_ttl for EIP-7045 #6569

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/beacon-node/src/network/gossip/gossipsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {SignaturePolicy, TopicStr} from "@chainsafe/libp2p-gossipsub/types";
import {PeerScoreParams} from "@chainsafe/libp2p-gossipsub/score";
import {MetricsRegister, TopicLabel, TopicStrToLabel} from "@chainsafe/libp2p-gossipsub/metrics";
import {BeaconConfig} from "@lodestar/config";
import {ATTESTATION_SUBNET_COUNT, ForkName, SYNC_COMMITTEE_SUBNET_COUNT} from "@lodestar/params";
import {ATTESTATION_SUBNET_COUNT, ForkName, SLOTS_PER_EPOCH, SYNC_COMMITTEE_SUBNET_COUNT} from "@lodestar/params";
import {Logger, Map2d, Map2dArr} from "@lodestar/utils";

import {RegistryMetricCreator} from "../../metrics/index.js";
Expand Down Expand Up @@ -99,7 +99,7 @@ export class Eth2Gossipsub extends GossipSub {
fanoutTTL: 60 * 1000,
mcacheLength: 6,
mcacheGossip: 3,
seenTTL: 550 * GOSSIPSUB_HEARTBEAT_INTERVAL,
seenTTL: config.SECONDS_PER_SLOT * SLOTS_PER_EPOCH * 2,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would adding a comment pointing to the specs make sense here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a pretty straightforward value which can be easily found in the spec
also EIP-7045 happens in a couple of places not just this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be in ms not second, fixed in #6607

scoreParams,
scoreThresholds: gossipScoreThresholds,
// For a single stream, await processing each RPC before processing the next
Expand Down
Loading