Add MobyMask contract deployment and watcher services
This commit is contained in:
parent
27e334c4f8
commit
59f60599c1
@ -71,9 +71,8 @@ services:
|
|||||||
- ../config/watcher-mobymask-v3/mobymask-params.env
|
- ../config/watcher-mobymask-v3/mobymask-params.env
|
||||||
environment:
|
environment:
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
CERC_L2_GETH_RPC: ${CERC_L2_GETH_RPC}
|
CERC_ETH_RPC_QUERY_ENDPOINT: ${CERC_ETH_RPC_QUERY_ENDPOINT}
|
||||||
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
|
CERC_ETH_RPC_MUTATION_ENDPOINT: ${CERC_ETH_RPC_MUTATION_ENDPOINT}
|
||||||
CERC_PRIVATE_KEY_DEPLOYER: ${CERC_PRIVATE_KEY_DEPLOYER}
|
|
||||||
CERC_RELAY_PEERS: ${CERC_RELAY_PEERS}
|
CERC_RELAY_PEERS: ${CERC_RELAY_PEERS}
|
||||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
CERC_PUBSUB: ${CERC_PUBSUB}
|
||||||
@ -86,6 +85,9 @@ services:
|
|||||||
CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER}
|
CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER}
|
||||||
CERC_PRIVATE_KEY_NITRO: ${CERC_PRIVATE_KEY_NITRO}
|
CERC_PRIVATE_KEY_NITRO: ${CERC_PRIVATE_KEY_NITRO}
|
||||||
CERC_PEER_ID: ${CERC_PEER_ID}
|
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"]
|
command: ["bash", "./start-server.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/watcher-mobymask-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml
|
- ../config/watcher-mobymask-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml
|
||||||
|
@ -5,8 +5,6 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|||||||
set -x
|
set -x
|
||||||
fi
|
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_RELAY_PEERS="${CERC_RELAY_PEERS:-${DEFAULT_CERC_RELAY_PEERS}}"
|
||||||
CERC_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}"
|
CERC_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}"
|
||||||
CERC_PUBSUB="${CERC_PUBSUB:-${DEFAULT_CERC_PUBSUB}}"
|
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"
|
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
|
# Use public domain for relay multiaddr in peer config if specified
|
||||||
# Otherwise, use the docker container's host IP
|
# Otherwise, use the docker container's host IP
|
||||||
@ -125,20 +124,24 @@ fi
|
|||||||
WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml)
|
WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml)
|
||||||
WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
|
WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
|
||||||
sed -E "s|REPLACE_WITH_CERC_RELAY_PEERS|${CERC_RELAY_PEERS}|g; \
|
sed -E "s|REPLACE_WITH_CERC_RELAY_PEERS|${CERC_RELAY_PEERS}|g; \
|
||||||
s|REPLACE_WITH_CERC_DENY_MULTIADDRS|${CERC_DENY_MULTIADDRS}|g; \
|
s|REPLACE_WITH_CERC_DENY_MULTIADDRS|${CERC_DENY_MULTIADDRS}|g; \
|
||||||
s/REPLACE_WITH_CERC_PUBSUB/${CERC_PUBSUB}/g; \
|
s/REPLACE_WITH_CERC_PUBSUB/${CERC_PUBSUB}/g; \
|
||||||
s/REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN/${CERC_RELAY_ANNOUNCE_DOMAIN}/g; \
|
s/REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN/${CERC_RELAY_ANNOUNCE_DOMAIN}/g; \
|
||||||
s|REPLACE_WITH_CERC_RELAY_MULTIADDR|${CERC_RELAY_MULTIADDR}|g; \
|
s|REPLACE_WITH_CERC_RELAY_MULTIADDR|${CERC_RELAY_MULTIADDR}|g; \
|
||||||
s|REPLACE_WITH_PEER_ID_FILE|${PEER_ID_FILE}|g; \
|
s|REPLACE_WITH_PEER_ID_FILE|${PEER_ID_FILE}|g; \
|
||||||
s/REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS/${CERC_ENABLE_PEER_L2_TXS}/g; \
|
s/REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS/${CERC_ENABLE_PEER_L2_TXS}/g; \
|
||||||
s/REPLACE_WITH_CERC_PRIVATE_KEY_PEER/${CERC_PRIVATE_KEY_PEER}/g; \
|
s/REPLACE_WITH_CERC_PRIVATE_KEY_PEER/${CERC_PRIVATE_KEY_PEER}/g; \
|
||||||
s/REPLACE_WITH_CERC_PRIVATE_KEY_NITRO/${CERC_PRIVATE_KEY_NITRO}/g; \
|
s/REPLACE_WITH_CERC_PRIVATE_KEY_NITRO/${CERC_PRIVATE_KEY_NITRO}/g; \
|
||||||
s/REPLACE_WITH_CONTRACT_ADDRESS/${CONTRACT_ADDRESS}/g; \
|
s/REPLACE_WITH_CONTRACT_ADDRESS/${CONTRACT_ADDRESS}/g; \
|
||||||
s/REPLACE_WITH_CONSENSUS_ENABLED/${CONSENSUS_ENABLED}/g; \
|
s/REPLACE_WITH_CONSENSUS_ENABLED/${CONSENSUS_ENABLED}/g; \
|
||||||
s/REPLACE_WITH_CONSENSUS_PUBLIC_KEY/${CONSENSUS_PUBLIC_KEY}/g; \
|
s/REPLACE_WITH_CONSENSUS_PUBLIC_KEY/${CONSENSUS_PUBLIC_KEY}/g; \
|
||||||
s/REPLACE_WITH_CONSENSUS_PRIVATE_KEY/${CONSENSUS_PRIVATE_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_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
|
# Write the modified content to a new file
|
||||||
echo "$WATCHER_CONFIG" > environments/local.toml
|
echo "$WATCHER_CONFIG" > environments/local.toml
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
# Use -1 for skipping check on block range.
|
# Use -1 for skipping check on block range.
|
||||||
maxEventsBlockRange = -1
|
maxEventsBlockRange = -1
|
||||||
|
|
||||||
|
# Flag to specify whether RPC endpoint supports block hash as block tag parameter
|
||||||
|
rpcSupportsBlockHashParam = true
|
||||||
|
|
||||||
[server.p2p]
|
[server.p2p]
|
||||||
enableRelay = true
|
enableRelay = true
|
||||||
enablePeer = true
|
enablePeer = true
|
||||||
@ -41,6 +44,9 @@
|
|||||||
pubsub = 'REPLACE_WITH_CERC_PUBSUB'
|
pubsub = 'REPLACE_WITH_CERC_PUBSUB'
|
||||||
enableDebugInfo = true
|
enableDebugInfo = true
|
||||||
enableL2Txs = REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS
|
enableL2Txs = REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS
|
||||||
|
pingInterval = 4000
|
||||||
|
pingTimeout = 1500
|
||||||
|
maxRelayConnections = 10
|
||||||
|
|
||||||
[server.p2p.peer.l2TxsConfig]
|
[server.p2p.peer.l2TxsConfig]
|
||||||
privateKey = 'REPLACE_WITH_CERC_PRIVATE_KEY_PEER'
|
privateKey = 'REPLACE_WITH_CERC_PRIVATE_KEY_PEER'
|
||||||
@ -87,9 +93,14 @@
|
|||||||
|
|
||||||
[upstream]
|
[upstream]
|
||||||
[upstream.ethServer]
|
[upstream.ethServer]
|
||||||
gqlApiEndpoint = "http://ipld-eth-server:8083/graphql"
|
gqlApiEndpoint = 'http://ipld-eth-server:8083/graphql'
|
||||||
rpcProviderEndpoint = "REPLACE_WITH_CERC_L2_GETH_RPC_ENDPOINT"
|
rpcProviderEndpoint = 'REPLACE_WITH_CERC_ETH_RPC_QUERY_ENDPOINT'
|
||||||
blockDelayInMilliSecs = 60000
|
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]
|
[upstream.cache]
|
||||||
name = "requests"
|
name = "requests"
|
||||||
@ -101,3 +112,4 @@
|
|||||||
maxCompletionLagInSecs = 300
|
maxCompletionLagInSecs = 300
|
||||||
jobDelayInMilliSecs = 100
|
jobDelayInMilliSecs = 100
|
||||||
eventsInBatch = 50
|
eventsInBatch = 50
|
||||||
|
blockDelayInMilliSecs = 60000
|
||||||
|
@ -10,6 +10,10 @@ repos:
|
|||||||
# nitro repos
|
# nitro repos
|
||||||
- github.com/cerc-io/ts-nitro
|
- github.com/cerc-io/ts-nitro
|
||||||
- github.com/cerc-io/go-nitro@pm-disable-compression
|
- 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:
|
containers:
|
||||||
# fixturenet images
|
# fixturenet images
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
@ -22,6 +26,10 @@ containers:
|
|||||||
- cerc/ipld-eth-server
|
- cerc/ipld-eth-server
|
||||||
- cerc/nitro-contracts
|
- cerc/nitro-contracts
|
||||||
- cerc/go-nitro
|
- cerc/go-nitro
|
||||||
|
# mobymask watcher images
|
||||||
|
- cerc/watcher-ts
|
||||||
|
- cerc/watcher-mobymask-v3
|
||||||
|
- cerc/mobymask
|
||||||
pods:
|
pods:
|
||||||
- fixturenet-eth
|
- fixturenet-eth
|
||||||
- ipld-eth-server
|
- ipld-eth-server
|
||||||
@ -29,3 +37,4 @@ pods:
|
|||||||
- nitro-contracts
|
- nitro-contracts
|
||||||
- go-nitro
|
- go-nitro
|
||||||
- nitro-reverse-payment-proxy
|
- nitro-reverse-payment-proxy
|
||||||
|
- watcher-mobymask-v3
|
||||||
|
@ -4,7 +4,7 @@ name: mobymask-v3
|
|||||||
repos:
|
repos:
|
||||||
- github.com/cerc-io/ts-nitro
|
- github.com/cerc-io/ts-nitro
|
||||||
- github.com/cerc-io/watcher-ts@v0.2.57
|
- 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@v0.1.3
|
||||||
- github.com/cerc-io/mobymask-ui
|
- github.com/cerc-io/mobymask-ui
|
||||||
containers:
|
containers:
|
||||||
|
Loading…
Reference in New Issue
Block a user