Skip to content

Commit

Permalink
reverted some gossipsub changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aminsammara committed Feb 27, 2025
1 parent cea8b93 commit 506f144
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yarn-project/foundation/src/config/env_var.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ export type EnvVar =
| 'P2P_GOSSIPSUB_INTERVAL_MS' // The interval of the gossipsub heartbeat to perform maintenance tasks.
| 'P2P_GOSSIPSUB_MCACHE_GOSSIP' // How many message cache windows to include when gossiping with other peers.
| 'P2P_GOSSIPSUB_MCACHE_LENGTH' // he number of gossipsub interval message cache windows to keep
| 'P2P_GOSSIPSUB_TX_INVALID_MESSAGE_DELIVERIES_DECAY' // Determines how quickly the penalty for invalid message deliveries decays over time. Between 0 and 1. TODO: Delete this env variable
| 'P2P_GOSSIPSUB_TX_INVALID_MESSAGE_DELIVERIES_WEIGHT' // The weight of the tx invalid message deliveries for the gossipsub protocol. TODO: delete this env variable
| 'P2P_GOSSIPSUB_TX_TOPIC_WEIGHT' // The weight of the tx topic for the gossipsub protocol. TODO:delete this env variable.
| 'P2P_MAX_PEERS' // The maximum number of peers to connect to
| 'P2P_PEER_CHECK_INTERVAL_MS' // The frequency with which to check for new peers.
| 'P2P_PEER_PENALTY_VALUES' // The values for the peer scoring system. Passed as a comma separated list of values in order: low, mid, high tolerance errors.'
Expand Down
15 changes: 15 additions & 0 deletions yarn-project/p2p/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,21 @@ export const p2pConfigMappings: ConfigMappingsType<P2PConfig> = {
description: 'How many message cache windows to include when gossiping with other pears.',
...numberConfigHelper(3),
},
gossipsubTxTopicWeight: {
env: 'P2P_GOSSIPSUB_TX_TOPIC_WEIGHT',
description: 'The weight of the tx topic for the gossipsub protocol.',
...numberConfigHelper(1),
},
gossipsubTxInvalidMessageDeliveriesWeight: {
env: 'P2P_GOSSIPSUB_TX_INVALID_MESSAGE_DELIVERIES_WEIGHT',
description: 'The weight of the tx invalid message deliveries for the gossipsub protocol.',
...numberConfigHelper(-20),
},
gossipsubTxInvalidMessageDeliveriesDecay: {
env: 'P2P_GOSSIPSUB_TX_INVALID_MESSAGE_DELIVERIES_DECAY',
description: 'Determines how quickly the penalty for invalid message deliveries decays over time. Between 0 and 1.',
...numberConfigHelper(0.5),
},
peerPenaltyValues: {
env: 'P2P_PEER_PENALTY_VALUES',
parseEnv: (val: string) => val.split(',').map(Number),
Expand Down

0 comments on commit 506f144

Please sign in to comment.