From 569a6ed49134f9ef79429dd805e73aa124ac0a6d Mon Sep 17 00:00:00 2001 From: jianguo Date: Mon, 16 Oct 2023 13:50:16 +0800 Subject: [PATCH] fix name --- .github/workflows/push-docker.yml | 4 +- Dockerfile | 4 +- Makefile | 20 +++++----- README.md | 4 +- cmd/main.go | 2 +- config/config.debug.toml | 2 +- config/config.local.toml | 14 +++---- config/default.go | 4 +- docker-compose.yml | 38 +++++++++---------- docs/running_local.md | 16 ++++---- scripts/cmd/main.go | 2 +- .../mocksmartcontracts/polygonzkevmbridge.sol | 6 +-- test/scripts/initialClaim/Readme.md | 2 +- 13 files changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index 575fce51..dbc1f51e 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -29,7 +29,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - okx/xagon-bridge-service - okx/xagon-bridge-service:2.0 + okx/xgon-bridge-service + okx/xgon-bridge-service:2.0 build-args: | PRIVATE_TOKEN=${{secrets.GIT_TOKEN}} diff --git a/Dockerfile b/Dockerfile index af149a80..169d2c25 100755 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ RUN cd /src && make build # CONTAINER FOR RUNNING BINARY FROM alpine:3.16.0 -COPY --from=build /src/dist/xagon-bridge /app/xagon-bridge +COPY --from=build /src/dist/xgon-bridge /app/xgon-bridge COPY --from=build /src/test/vectors /app/test/vectors EXPOSE 8080 EXPOSE 9090 -CMD ["/bin/sh", "-c", "/app/xagon-bridge run"] +CMD ["/bin/sh", "-c", "/app/xgon-bridge run"] diff --git a/Makefile b/Makefile index 5268a3cc..cbb2dafe 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ include version.mk DOCKER_COMPOSE := docker-compose -f docker-compose.yml -DOCKER_COMPOSE_STATE_DB := xagon-state-db -DOCKER_COMPOSE_POOL_DB := xagon-pool-db -DOCKER_COMPOSE_RPC_DB := xagon-rpc-db -DOCKER_COMPOSE_BRIDGE_DB := xagon-bridge-db -DOCKER_COMPOSE_ZKEVM_NODE := xagon-node -DOCKER_COMPOSE_L1_NETWORK := xagon-mock-l1-network -DOCKER_COMPOSE_ZKPROVER := xagon-prover -DOCKER_COMPOSE_BRIDGE := xagon-bridge-service +DOCKER_COMPOSE_STATE_DB := xgon-state-db +DOCKER_COMPOSE_POOL_DB := xgon-pool-db +DOCKER_COMPOSE_RPC_DB := xgon-rpc-db +DOCKER_COMPOSE_BRIDGE_DB := xgon-bridge-db +DOCKER_COMPOSE_ZKEVM_NODE := xgon-node +DOCKER_COMPOSE_L1_NETWORK := xgon-mock-l1-network +DOCKER_COMPOSE_ZKPROVER := xgon-prover +DOCKER_COMPOSE_BRIDGE := xgon-bridge-service RUN_STATE_DB := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_STATE_DB) RUN_POOL_DB := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_POOL_DB) @@ -36,7 +36,7 @@ LDFLAGS += -X 'github.com/0xPolygonHermez/zkevm-bridge-service.BuildDate=$(DATE) GO_BASE := $(shell pwd) GO_BIN := $(GO_BASE)/dist GO_ENV_VARS := GO_BIN=$(GO_BIN) -GO_BINARY := xagon-bridge +GO_BINARY := xgon-bridge GO_CMD := $(GO_BASE)/cmd LINT := $$(go env GOPATH)/bin/golangci-lint run --timeout=5m -E whitespace -E gosec -E gci -E misspell -E gomnd -E gofmt -E goimports --exclude-use-default=false --max-same-issues 0 @@ -66,7 +66,7 @@ install-linter: ## Installs the linter .PHONY: build-docker build-docker: ## Builds a docker image with the zkevm bridge binary - docker build -t xagon-bridge-service -f ./Dockerfile . + docker build -t xgon-bridge-service -f ./Dockerfile . .PHONY: run-db-node run-db-node: ## Runs the node database diff --git a/README.md b/README.md index 99d28b66..53a64b55 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Xagon Bridge service +# Xgon Bridge service This repo implements a backend service written in Go, that enables clients, like the [web UI](), -to interact with the [bridge smart contract](https://github.com/okx/Xagon-contracts) by providing Merkleproofs. +to interact with the [bridge smart contract](https://github.com/okx/Xgon-contracts) by providing Merkleproofs. ## Architecture diff --git a/cmd/main.go b/cmd/main.go index 4bd4119d..af2dc4fa 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -15,7 +15,7 @@ const ( const ( // App name - appName = "xagon-bridge" + appName = "xgon-bridge" ) func main() { diff --git a/config/config.debug.toml b/config/config.debug.toml index e0a11fb8..fd421232 100644 --- a/config/config.debug.toml +++ b/config/config.debug.toml @@ -60,7 +60,7 @@ BridgeVersion = "v1" [CoinKafkaConsumer] Brokers = ["localhost:9092"] Topics = ["explorer_chainAddressPrice_push"] -ConsumerGroupID = "xagon-bridge-service" +ConsumerGroupID = "xgon-bridge-service" InitialOffset = -1 Username = "" Password = "" diff --git a/config/config.local.toml b/config/config.local.toml index 44a8fac7..7437c092 100644 --- a/config/config.local.toml +++ b/config/config.local.toml @@ -7,7 +7,7 @@ Database = "postgres" User = "test_user" Password = "test_password" Name = "test_db" -Host = "xagon-bridge-db" +Host = "xgon-bridge-db" Port = "5432" MaxConns = 20 TableSuffix = "" @@ -21,8 +21,8 @@ RetryNumber = 10 FreeGas = true [Etherman] -L1URL = "http://xagon-mock-l1-network:8545" -L2URLs = ["http://xagon-node:8123"] +L1URL = "http://xgon-mock-l1-network:8545" +L2URLs = ["http://xgon-node:8123"] L1ChainId = 5 L2ChainIds = [1001] @@ -47,21 +47,21 @@ SentinelConfigFilePath = "/app/sentinel_config.json" User = "test_user" Password = "test_password" Name = "test_db" - Host = "xagon-bridge-db" + Host = "xgon-bridge-db" Port = "5432" MaxConns = 20 TableSuffix = "" [BridgeServer.Redis] - Addr = "xagon-bridge-redis:6379" + Addr = "xgon-bridge-redis:6379" Username = "" Password = "" DB = 0 MockPrice = true [CoinKafkaConsumer] -Brokers = ["xagon-bridge-coin-kafka:9092"] +Brokers = ["xgon-bridge-coin-kafka:9092"] Topics = ["explorer_chainAddressPrice_push"] -ConsumerGroupID = "xagon-bridge-service" +ConsumerGroupID = "xgon-bridge-service" InitialOffset = -1 Username = "" Password = "" diff --git a/config/default.go b/config/default.go index 533dac93..b4a3490d 100644 --- a/config/default.go +++ b/config/default.go @@ -11,7 +11,7 @@ Database = "postgres" User = "test_user" Password = "test_password" Name = "test_db" -Host = "xagon-bridge-db" +Host = "xgon-bridge-db" Port = "5432" MaxConns = 20 @@ -46,7 +46,7 @@ BridgeVersion = "v1" User = "test_user" Password = "test_password" Name = "test_db" - Host = "xagon-bridge-db" + Host = "xgon-bridge-db" Port = "5432" MaxConns = 20 ` diff --git a/docker-compose.yml b/docker-compose.yml index bc01c646..22b84612 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.5' services: - xagon-state-db: - container_name: xagon-state-db + xgon-state-db: + container_name: xgon-state-db image: postgres deploy: resources: @@ -19,8 +19,8 @@ services: - POSTGRES_DB=state_db command: ["postgres", "-N", "500"] - xagon-pool-db: - container_name: xagon-pool-db + xgon-pool-db: + container_name: xgon-pool-db image: postgres deploy: resources: @@ -36,8 +36,8 @@ services: - POSTGRES_DB=pool_db command: ["postgres", "-N", "500"] - xagon-bridge-db: - container_name: xagon-bridge-db + xgon-bridge-db: + container_name: xgon-bridge-db image: postgres deploy: resources: @@ -55,8 +55,8 @@ services: - POSTGRES_DB=test_db command: ["postgres", "-N", "500"] - xagon-bridge-redis: - container_name: xagon-bridge-redis + xgon-bridge-redis: + container_name: xgon-bridge-redis image: redis deploy: resources: @@ -81,9 +81,9 @@ services: expose: - 2181 - xagon-bridge-coin-kafka: + xgon-bridge-coin-kafka: image: wurstmeister/kafka - container_name: xagon-bridge-coin-kafka + container_name: xgon-bridge-coin-kafka expose: - 9092 environment: @@ -135,9 +135,9 @@ services: command: > zkProver -c /usr/src/app/config.json - xagon-bridge-service: - container_name: xagon-bridge-service - image: xagon-bridge-service + xgon-bridge-service: + container_name: xgon-bridge-service + image: xgon-bridge-service ports: - 8080:8080 - 9090:9090 @@ -145,7 +145,7 @@ services: - ZKEVM_BRIDGE_DATABASE_USER=test_user - ZKEVM_BRIDGE_DATABASE_PASSWORD=test_password - ZKEVM_BRIDGE_DATABASE_NAME=test_db - - ZKEVM_BRIDGE_DATABASE_HOST=xagon-bridge-db + - ZKEVM_BRIDGE_DATABASE_HOST=xgon-bridge-db - ZKEVM_BRIDGE_DATABASE_PORT=5432 volumes: - ./test/test.keystore.claimtx:/pk/keystore.claimtxmanager @@ -154,15 +154,15 @@ services: command: - "/bin/sh" - "-c" - - "/app/xagon-bridge run --cfg /app/config.toml" + - "/app/xgon-bridge run --cfg /app/config.toml" - xagon-bridge-kafka-consumer: - container_name: xagon-bridge-kafka-consumer - image: xagon-bridge-service + xgon-bridge-kafka-consumer: + container_name: xgon-bridge-kafka-consumer + image: xgon-bridge-service volumes: - ./config/config.local.toml:/app/config.toml - ./coinmiddleware/root-ca-cert:/app/root-ca-cert command: - "/bin/sh" - "-c" - - "/app/xagon-bridge runKafkaConsumer --cfg /app/config.toml" \ No newline at end of file + - "/app/xgon-bridge runKafkaConsumer --cfg /app/config.toml" \ No newline at end of file diff --git a/docs/running_local.md b/docs/running_local.md index aa54338a..8693d94b 100644 --- a/docs/running_local.md +++ b/docs/running_local.md @@ -6,12 +6,12 @@ This documentation will help you running the following components: -- Xagon Node Databases -- Xagon Bridge Database +- Xgon Node Databases +- Xgon Bridge Database - L1 Network - Prover -- Xagon Node -- Xagon Bridge Service +- Xgon Node +- Xgon Bridge Service ## Requirements @@ -21,8 +21,8 @@ The current version of the environment requires `go`, `docker` and `docker-compo - - -The `xagon-bridge-service` docker image must be built at least once and every time a change is made to the code. -If you haven't build the `xagon-bridge-service` image yet, you must run: +The `xgon-bridge-service` docker image must be built at least once and every time a change is made to the code. +If you haven't build the `xgon-bridge-service` image yet, you must run: ```bash make build-docker @@ -53,7 +53,7 @@ make test-edge ## Accessing the environment -- Xagon Bridge Database +- Xgon Bridge Database - `Type:` Postgres DB - `User:` test_user - `Password:` test_password @@ -61,7 +61,7 @@ make test-edge - `Host:` localhost - `Port:` 5435 - `Url:` -- Xagon Bridge Service +- Xgon Bridge Service - `Type:` Web - `Host:` localhost - `Port:` 8080 diff --git a/scripts/cmd/main.go b/scripts/cmd/main.go index fc745da4..d07e6e60 100644 --- a/scripts/cmd/main.go +++ b/scripts/cmd/main.go @@ -9,7 +9,7 @@ import ( func main() { app := cli.NewApp() - app.Name = "xagon-bridge-scripts" + app.Name = "xgon-bridge-scripts" app.Commands = []*cli.Command{ { Name: "updatedeps", diff --git a/test/mocksmartcontracts/polygonzkevmbridge.sol b/test/mocksmartcontracts/polygonzkevmbridge.sol index d4649b8d..af45cb2b 100644 --- a/test/mocksmartcontracts/polygonzkevmbridge.sol +++ b/test/mocksmartcontracts/polygonzkevmbridge.sol @@ -13,7 +13,7 @@ import "./lib/EmergencyManager.sol"; import "./lib/GlobalExitRootLib.sol"; /** - * PolygonZkEVMBridge that will be deployed on both networks Ethereum and Xagon + * PolygonZkEVMBridge that will be deployed on both networks Ethereum and Xgon * Contract responsible to manage the token interactions with other networks */ contract PolygonZkEVMBridge is @@ -407,7 +407,7 @@ contract PolygonZkEVMBridge is /** * @notice Function to activate the emergency state - " Only can be called by the Xagon in extreme situations + " Only can be called by the Xgon in extreme situations */ function activateEmergencyState() external onlyPolygonZkEVM { _activateEmergencyState(); @@ -415,7 +415,7 @@ contract PolygonZkEVMBridge is /** * @notice Function to deactivate the emergency state - " Only can be called by the Xagon + " Only can be called by the Xgon */ function deactivateEmergencyState() external onlyPolygonZkEVM { _deactivateEmergencyState(); diff --git a/test/scripts/initialClaim/Readme.md b/test/scripts/initialClaim/Readme.md index cf3b744c..14406f00 100644 --- a/test/scripts/initialClaim/Readme.md +++ b/test/scripts/initialClaim/Readme.md @@ -15,7 +15,7 @@ At the beginning of the script there are the next constant variables that need t bridgeURL = "http://localhost:8080" ``` `l2BridgeAddr` is the bridge address smart contract in L2 -`zkevmAddr` is the xagonZkEvm address in L1 +`zkevmAddr` is the xgonZkEvm address in L1 `accHexAddress` is the wallet address used to send the claim in L2 and to send the forcedBatch in L1 `accHexPrivateKey` is the wallet private key used to send the claim in L2 and to send the forcedBatch in L1 `l1NetworkURL` is the url of the L1 rpc