Skip to content

Commit

Permalink
update image config
Browse files Browse the repository at this point in the history
  • Loading branch information
zjg555543 committed Oct 30, 2023
1 parent 0ee48c8 commit 51a3143
Show file tree
Hide file tree
Showing 7 changed files with 287 additions and 102 deletions.
51 changes: 46 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ DOCKER_COMPOSE_BRIDGE_DB := xgon-bridge-db
DOCKER_COMPOSE_DAC_DB := xgon-data-availability-db
DOCKER_COMPOSE_REDIS := xgon-bridge-redis
DOCKER_COMPOSE_ZKEVM_NODE := xgon-node

DOCKER_COMPOSE_SEQ := xgon-sequencer
DOCKER_COMPOSE_SEQ_SENDER := xgon-sequence-sender
DOCKER_COMPOSE_L2_GASP := xgon-l2gaspricer
DOCKER_COMPOSE_AGG := xgon-aggregator
DOCKER_COMPOSE_RPC := xgon-json-rpc
DOCKER_COMPOSE_SYNC := xgon-sync
DOCKER_COMPOSE_ETH_TX_MANAGER := xgon-eth-tx-manager

DOCKER_COMPOSE_L1_NETWORK := xgon-mock-l1-network
DOCKER_COMPOSE_ZKPROVER := xgon-prover
DOCKER_COMPOSE_BRIDGE := xgon-bridge-service
Expand All @@ -28,15 +37,27 @@ RUN_DA := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_DA_NODE)
RUN_KAFKA := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_KAFKA_NODE)
RUN_COIN_KAFKA := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_COIN_KAFKA_NODE)
RUN_ZOOKEEPER := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_ZOOKEEPER)
RUN_NODE := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_ZKEVM_NODE)
RUN_SEQUENCER := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_SEQ)
RUN_SEQUENCE_SENDER := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_SEQ_SENDER)
RUN_L2_GAS_PRICER := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_L2_GASP)
RUN_AGGREGATOR := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_AGG)
RUN_JSON_RPC := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_RPC)
RUN_SYNC := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_SYNC)
RUN_ETH_TX_MANAGER := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_ETH_TX_MANAGER)
RUN_L1_NETWORK := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_L1_NETWORK)
RUN_ZKPROVER := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_ZKPROVER)
RUN_BRIDGE := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_BRIDGE)

STOP_NODE_DB := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_NODE_DB) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_NODE_DB)
STOP_BRIDGE_DB := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_BRIDGE_DB) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_BRIDGE_DB)
STOP_DBS := ${STOP_NODE_DB} && ${STOP_BRIDGE_DB}
STOP_NODE := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_ZKEVM_NODE) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_ZKEVM_NODE)
STOP_SEQUENCER := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_SEQ) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_SEQ)
STOP_SEQUENCE_SENDER := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_SEQ_SENDER) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_SEQ_SENDER)
STOP_L2_GAS_PRICER := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_L2_GASP) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_L2_GASP)
STOP_AGGREGATOR := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_AGG) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_AGG)
STOP_JSON_RPC := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_RPC) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_RPC)
STOP_SYNC := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_SYNC) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_SYNC)
STOP_ETH_TX_MANAGER := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_ETH_TX_MANAGER) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_ETH_TX_MANAGER)
STOP_NETWORK := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_L1_NETWORK) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_L1_NETWORK)
STOP_ZKPROVER := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_ZKPROVER) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_ZKPROVER)
STOP_BRIDGE := $(DOCKER_COMPOSE) stop $(DOCKER_COMPOSE_BRIDGE) && $(DOCKER_COMPOSE) rm -f $(DOCKER_COMPOSE_BRIDGE)
Expand Down Expand Up @@ -108,11 +129,24 @@ stop-dbs: ## Stops the node database

.PHONY: run-node
run-node: ## Runs the node
$(RUN_NODE)
$(RUN_ETH_TX_MANAGER)
$(RUN_SYNC)
sleep 2
$(RUN_SEQUENCER)
$(RUN_SEQUENCE_SENDER)
$(RUN_L2_GAS_PRICER)
$(RUN_AGGREGATOR)
$(RUN_JSON_RPC)

.PHONY: stop-node
stop-node: ## Stops the node
$(STOP_NODE)
$(STOP_SEQUENCER)
$(STOP_SEQUENCE_SENDER)
$(STOP_JSON_RPC)
$(STOP_L2_GAS_PRICER)
$(STOP_AGGREGATOR)
$(STOP_SYNC)
$(STOP_ETH_TX_MANAGER)

.PHONY: run-network
run-network: ## Runs the l1 network
Expand Down Expand Up @@ -159,7 +193,14 @@ run: stop ## runs all services
sleep 3
$(RUN_DA)
sleep 3
$(RUN_NODE)
$(RUN_SYNC)
sleep 2
$(RUN_ETH_TX_MANAGER)
$(RUN_SEQUENCER)
$(RUN_SEQUENCE_SENDER)
$(RUN_L2_GAS_PRICER)
$(RUN_AGGREGATOR)
$(RUN_JSON_RPC)
sleep 7
$(RUN_BRIDGE)

Expand Down
Loading

0 comments on commit 51a3143

Please sign in to comment.