Add MobyMask contract deployment and watcher services

This commit is contained in:
Prathamesh Musale 2023-09-29 16:54:31 +05:30
parent 27e334c4f8
commit 59f60599c1
5 changed files with 50 additions and 24 deletions

View File

@ -71,9 +71,8 @@ services:
- ../config/watcher-mobymask-v3/mobymask-params.env
environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_L2_GETH_RPC: ${CERC_L2_GETH_RPC}
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
CERC_PRIVATE_KEY_DEPLOYER: ${CERC_PRIVATE_KEY_DEPLOYER}
CERC_ETH_RPC_QUERY_ENDPOINT: ${CERC_ETH_RPC_QUERY_ENDPOINT}
CERC_ETH_RPC_MUTATION_ENDPOINT: ${CERC_ETH_RPC_MUTATION_ENDPOINT}
CERC_RELAY_PEERS: ${CERC_RELAY_PEERS}
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
CERC_PUBSUB: ${CERC_PUBSUB}
@ -86,6 +85,9 @@ services:
CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER}
CERC_PRIVATE_KEY_NITRO: ${CERC_PRIVATE_KEY_NITRO}
CERC_PEER_ID: ${CERC_PEER_ID}
CERC_UPSTREAM_NITRO_ADDRESS: ${CERC_UPSTREAM_NITRO_ADDRESS}
CERC_UPSTREAM_NITRO_MULTIADDR: ${CERC_UPSTREAM_NITRO_MULTIADDR}
CERC_UPSTREAM_NITRO_PAY_AMOUNT: ${CERC_UPSTREAM_NITRO_PAY_AMOUNT}
command: ["bash", "./start-server.sh"]
volumes:
- ../config/watcher-mobymask-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml

View File

@ -5,8 +5,6 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
CERC_L2_GETH_RPC="${CERC_L2_GETH_RPC:-${DEFAULT_CERC_L2_GETH_RPC}}"
CERC_RELAY_PEERS="${CERC_RELAY_PEERS:-${DEFAULT_CERC_RELAY_PEERS}}"
CERC_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}"
CERC_PUBSUB="${CERC_PUBSUB:-${DEFAULT_CERC_PUBSUB}}"
@ -16,7 +14,8 @@ CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRA
watcher_keys_dir="./keys"
echo "Using L2 RPC endpoint ${CERC_L2_GETH_RPC}"
echo "Using RPC query endpoint ${CERC_ETH_RPC_QUERY_ENDPOINT}"
echo "Using RPC mutation endpoint ${CERC_ETH_RPC_MUTATION_ENDPOINT}"
# Use public domain for relay multiaddr in peer config if specified
# Otherwise, use the docker container's host IP
@ -138,7 +137,11 @@ WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
s/REPLACE_WITH_CONSENSUS_PUBLIC_KEY/${CONSENSUS_PUBLIC_KEY}/g; \
s/REPLACE_WITH_CONSENSUS_PRIVATE_KEY/${CONSENSUS_PRIVATE_KEY}/g; \
s|REPLACE_WITH_WATCHER_PARTY_PEERS_FILE|${WATCHER_PARTY_PEERS_FILE}|g; \
s|REPLACE_WITH_CERC_L2_GETH_RPC_ENDPOINT|${CERC_L2_GETH_RPC}| ")
s|REPLACE_WITH_CERC_ETH_RPC_QUERY_ENDPOINT|${CERC_ETH_RPC_QUERY_ENDPOINT}|g; \
s|REPLACE_WITH_CERC_ETH_RPC_MUTATION_ENDPOINT|${CERC_ETH_RPC_MUTATION_ENDPOINT}|g; \
s/REPLACE_WITH_CERC_UPSTREAM_NITRO_ADDRESS/${CERC_UPSTREAM_NITRO_ADDRESS}/g; \
s|REPLACE_WITH_CERC_UPSTREAM_NITRO_MULTIADDR|${CERC_UPSTREAM_NITRO_MULTIADDR}|g; \
s/REPLACE_WITH_CERC_UPSTREAM_NITRO_PAY_AMOUNT/${CERC_UPSTREAM_NITRO_PAY_AMOUNT}/ ")
# Write the modified content to a new file
echo "$WATCHER_CONFIG" > environments/local.toml

View File

@ -19,6 +19,9 @@
# Use -1 for skipping check on block range.
maxEventsBlockRange = -1
# Flag to specify whether RPC endpoint supports block hash as block tag parameter
rpcSupportsBlockHashParam = true
[server.p2p]
enableRelay = true
enablePeer = true
@ -41,6 +44,9 @@
pubsub = 'REPLACE_WITH_CERC_PUBSUB'
enableDebugInfo = true
enableL2Txs = REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS
pingInterval = 4000
pingTimeout = 1500
maxRelayConnections = 10
[server.p2p.peer.l2TxsConfig]
privateKey = 'REPLACE_WITH_CERC_PRIVATE_KEY_PEER'
@ -87,9 +93,14 @@
[upstream]
[upstream.ethServer]
gqlApiEndpoint = "http://ipld-eth-server:8083/graphql"
rpcProviderEndpoint = "REPLACE_WITH_CERC_L2_GETH_RPC_ENDPOINT"
blockDelayInMilliSecs = 60000
gqlApiEndpoint = 'http://ipld-eth-server:8083/graphql'
rpcProviderEndpoint = 'REPLACE_WITH_CERC_ETH_RPC_QUERY_ENDPOINT'
rpcProviderMutationEndpoint = 'REPLACE_WITH_CERC_ETH_RPC_MUTATION_ENDPOINT'
[upstream.ethServer.rpcProviderNitroNode]
address = 'REPLACE_WITH_CERC_UPSTREAM_NITRO_ADDRESS'
multiAddr = 'REPLACE_WITH_CERC_UPSTREAM_NITRO_MULTIADDR'
amount = 'REPLACE_WITH_CERC_UPSTREAM_NITRO_PAY_AMOUNT'
[upstream.cache]
name = "requests"
@ -101,3 +112,4 @@
maxCompletionLagInSecs = 300
jobDelayInMilliSecs = 100
eventsInBatch = 50
blockDelayInMilliSecs = 60000

View File

@ -10,6 +10,10 @@ repos:
# nitro repos
- github.com/cerc-io/ts-nitro
- github.com/cerc-io/go-nitro@pm-disable-compression
# mobymask watcher repos
- github.com/cerc-io/watcher-ts@v0.2.61
- github.com/cerc-io/mobymask-v2-watcher-ts@v0.2.0 # TODO: Update
- github.com/cerc-io/MobyMask@v0.1.3
containers:
# fixturenet images
- cerc/go-ethereum
@ -22,6 +26,10 @@ containers:
- cerc/ipld-eth-server
- cerc/nitro-contracts
- cerc/go-nitro
# mobymask watcher images
- cerc/watcher-ts
- cerc/watcher-mobymask-v3
- cerc/mobymask
pods:
- fixturenet-eth
- ipld-eth-server
@ -29,3 +37,4 @@ pods:
- nitro-contracts
- go-nitro
- nitro-reverse-payment-proxy
- watcher-mobymask-v3

View File

@ -4,7 +4,7 @@ name: mobymask-v3
repos:
- github.com/cerc-io/ts-nitro
- github.com/cerc-io/watcher-ts@v0.2.57
- github.com/cerc-io/mobymask-v2-watcher-ts@v3
- github.com/cerc-io/mobymask-v2-watcher-ts@v0.2.0
- github.com/cerc-io/MobyMask@v0.1.3
- github.com/cerc-io/mobymask-ui
containers: