Skip to content

Commit

Permalink
disable peer block gossiping with config blockGossipEnabled flag (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
asararatnakar authored Oct 27, 2023
1 parent a7bd80c commit cc4ed8f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions defaultconfig/peer/v2/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,12 @@ peer:

# Delivery service related config
deliveryclient:
# Enables this peer to disseminate blocks it pulled from the ordering service
# via gossip.
# Note that 'gossip.state.enabled' controls point to point block replication
# of blocks committed in the past.
blockGossipEnabled: false

# It sets the total time the delivery service may spend in reconnection
# attempts until its retry logic gives up and returns an error
reconnectTotalTimeThreshold: 3600s
Expand Down
6 changes: 6 additions & 0 deletions defaultconfig/peer/v25/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ peer:

# Delivery service related config
deliveryclient:
# Enables this peer to disseminate blocks it pulled from the ordering service
# via gossip.
# Note that 'gossip.state.enabled' controls point to point block replication
# of blocks committed in the past.
blockGossipEnabled: false

# It sets the total time the delivery service may spend in reconnection
# attempts until its retry logic gives up and returns an error
reconnectTotalTimeThreshold: 3600s
Expand Down
3 changes: 3 additions & 0 deletions pkg/offering/base/peer/override/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,9 @@ func (o *Override) V2Deployment(instance *current.IBPPeer, deployment *dep.Deplo
peerContainer.AppendEnvIfMissing("CORE_PEER_KEEPALIVE_CLIENT_INTERVAL", "30s")
peerContainer.AppendEnvIfMissing("CORE_PEER_KEEPALIVE_DELIVERYCLIENT_INTERVAL", "30s")

// Disable the flag peer.deliveryclient.blockGossipEnabled for existing v2 peers
peerContainer.AppendEnvIfMissing("CORE_PEER_DELIVERYCLIENT_BLOCKGOSSIPENABLED", "false")

// Will delete these envs if found, these are not required for v2
peerContainer.DeleteEnv("CORE_VM_ENDPOINT")
peerContainer.DeleteEnv("CORE_CHAINCODE_GOLANG_RUNTIME")
Expand Down

0 comments on commit cc4ed8f

Please sign in to comment.