Update mobymask-v3 stack with gossipsub direct peers option #539

Merged
prathamesh0 merged 1 commits from sk-directpeers-change into main 2023-09-25 09:25:53 +00:00
4 changed files with 10 additions and 1 deletions

View File

@ -14,6 +14,7 @@ services:
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
CERC_PUBSUB: ${CERC_PUBSUB}
CERC_GOSSIPSUB_DIRECT_PEERS: ${CERC_GOSSIPSUB_DIRECT_PEERS}
CERC_RELEASE: "laconic-v3"
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}

View File

@ -10,6 +10,7 @@ CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRA
CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}"
CERC_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}"
CERC_PUBSUB="${CERC_PUBSUB:-${DEFAULT_CERC_PUBSUB}}"
CERC_GOSSIPSUB_DIRECT_PEERS="${CERC_GOSSIPSUB_DIRECT_PEERS:-${DEFAULT_CERC_GOSSIPSUB_DIRECT_PEERS}}"
echo "Using CERC_RELAY_NODES $CERC_RELAY_NODES"
@ -49,7 +50,8 @@ jq --arg address "$CERC_DEPLOYED_CONTRACT" \
--argjson relayNodes "$CERC_RELAY_NODES" \
--argjson denyMultiaddrs "$CERC_DENY_MULTIADDRS" \
--arg pubsub "$CERC_PUBSUB" \
'.address = $address | .chainId = $chainId | .relayNodes = $relayNodes | .peer.denyMultiaddrs = $denyMultiaddrs | .peer.pubsub = $pubsub' \
--argjson directPeers "$CERC_GOSSIPSUB_DIRECT_PEERS" \
'.address = $address | .chainId = $chainId | .relayNodes = $relayNodes | .peer.denyMultiaddrs = $denyMultiaddrs | .peer.pubsub = $pubsub | .peer.directPeers = $directPeers' \
/app/src/mobymask-app-config.json > /app/src/utils/config.json
yarn install

View File

@ -28,6 +28,9 @@ DEFAULT_CERC_DENY_MULTIADDRS=[]
# Type of pubsub to be used
DEFAULT_CERC_PUBSUB=""
# Set of direct peers to be used when pubsub is set to gossipsub
DEFAULT_CERC_GOSSIPSUB_DIRECT_PEERS=[]
# Set deployed Nitro addresses to avoid deploying them in the stack
DEFAULT_CERC_NA_ADDRESS=
DEFAULT_CERC_VPA_ADDRESS=

View File

@ -45,6 +45,9 @@ Create and update an env file to be used in the next step ([defaults](../../conf
# (Optional) Type of pubsub to be used ("floodsub" | "gossipsub")
CERC_PUBSUB=""
# (Optional) Set of direct peers to be used when pubsub is set to gossipsub
CERC_GOSSIPSUB_DIRECT_PEERS=[]
# Set Nitro addresses
CERC_NA_ADDRESS=
CERC_VPA_ADDRESS=