Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix name #13

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ RUN cd /src && make build

# CONTAINER FOR RUNNING BINARY
FROM alpine:3.16.0
COPY --from=build /src/dist/zkevm-bridge /app/zkevm-bridge
COPY --from=build /src/dist/xagon-bridge /app/xagon-bridge
COPY --from=build /src/test/vectors /app/test/vectors
EXPOSE 8080
EXPOSE 9090
CMD ["/bin/sh", "-c", "/app/zkevm-bridge run"]
CMD ["/bin/sh", "-c", "/app/xagon-bridge run"]
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
include version.mk

DOCKER_COMPOSE := docker-compose -f docker-compose.yml
DOCKER_COMPOSE_STATE_DB := zkevm-state-db
DOCKER_COMPOSE_POOL_DB := zkevm-pool-db
DOCKER_COMPOSE_RPC_DB := zkevm-rpc-db
DOCKER_COMPOSE_BRIDGE_DB := zkevm-bridge-db
DOCKER_COMPOSE_ZKEVM_NODE := zkevm-node
DOCKER_COMPOSE_L1_NETWORK := zkevm-mock-l1-network
DOCKER_COMPOSE_ZKPROVER := zkevm-prover
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

RUN_STATE_DB := $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE_STATE_DB)
Expand Down Expand Up @@ -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 := zkevm-bridge
GO_BINARY := xagon-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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# zkEVM Bridge service
# Xagon 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.
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (

const (
// App name
appName = "zkevm-bridge"
appName = "xagon-bridge"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion config/config.debug.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ BridgeVersion = "v1"
[CoinKafkaConsumer]
Brokers = ["localhost:9092"]
Topics = ["explorer_chainAddressPrice_push"]
ConsumerGroupID = "zkevm-bridge-service"
ConsumerGroupID = "xagon-bridge-service"
InitialOffset = -1
Username = ""
Password = ""
Expand Down
14 changes: 7 additions & 7 deletions config/config.local.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Database = "postgres"
User = "test_user"
Password = "test_password"
Name = "test_db"
Host = "zkevm-bridge-db"
Host = "xagon-bridge-db"
Port = "5432"
MaxConns = 20
TableSuffix = ""
Expand All @@ -21,8 +21,8 @@ RetryNumber = 10
FreeGas = true

[Etherman]
L1URL = "http://zkevm-mock-l1-network:8545"
L2URLs = ["http://zkevm-node:8123"]
L1URL = "http://xagon-mock-l1-network:8545"
L2URLs = ["http://xagon-node:8123"]
L1ChainId = 5
L2ChainIds = [1001]

Expand All @@ -47,21 +47,21 @@ SentinelConfigFilePath = "/app/sentinel_config.json"
User = "test_user"
Password = "test_password"
Name = "test_db"
Host = "zkevm-bridge-db"
Host = "xagon-bridge-db"
Port = "5432"
MaxConns = 20
TableSuffix = ""
[BridgeServer.Redis]
Addr = "zkevm-bridge-redis:6379"
Addr = "xagon-bridge-redis:6379"
Username = ""
Password = ""
DB = 0
MockPrice = true

[CoinKafkaConsumer]
Brokers = ["zkevm-bridge-coin-kafka:9092"]
Brokers = ["xagon-bridge-coin-kafka:9092"]
Topics = ["explorer_chainAddressPrice_push"]
ConsumerGroupID = "zkevm-bridge-service"
ConsumerGroupID = "xagon-bridge-service"
InitialOffset = -1
Username = ""
Password = ""
Expand Down
4 changes: 2 additions & 2 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Database = "postgres"
User = "test_user"
Password = "test_password"
Name = "test_db"
Host = "zkevm-bridge-db"
Host = "xagon-bridge-db"
Port = "5432"
MaxConns = 20

Expand Down Expand Up @@ -46,7 +46,7 @@ BridgeVersion = "v1"
User = "test_user"
Password = "test_password"
Name = "test_db"
Host = "zkevm-bridge-db"
Host = "xagon-bridge-db"
Port = "5432"
MaxConns = 20
`
30 changes: 15 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.5'
services:
zkevm-state-db:
container_name: zkevm-state-db
xagon-state-db:
container_name: xagon-state-db
image: postgres
deploy:
resources:
Expand All @@ -19,8 +19,8 @@ services:
- POSTGRES_DB=state_db
command: ["postgres", "-N", "500"]

zkevm-pool-db:
container_name: zkevm-pool-db
xagon-pool-db:
container_name: xagon-pool-db
image: postgres
deploy:
resources:
Expand All @@ -36,8 +36,8 @@ services:
- POSTGRES_DB=pool_db
command: ["postgres", "-N", "500"]

zkevm-bridge-db:
container_name: zkevm-bridge-db
xagon-bridge-db:
container_name: xagon-bridge-db
image: postgres
deploy:
resources:
Expand All @@ -55,8 +55,8 @@ services:
- POSTGRES_DB=test_db
command: ["postgres", "-N", "500"]

zkevm-bridge-redis:
container_name: zkevm-bridge-redis
xagon-bridge-redis:
container_name: xagon-bridge-redis
image: redis
deploy:
resources:
Expand All @@ -81,9 +81,9 @@ services:
expose:
- 2181

zkevm-bridge-coin-kafka:
xagon-bridge-coin-kafka:
image: wurstmeister/kafka
container_name: zkevm-bridge-coin-kafka
container_name: xagon-bridge-coin-kafka
expose:
- 9092
environment:
Expand Down Expand Up @@ -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=zkevm-bridge-db
- ZKEVM_BRIDGE_DATABASE_HOST=xagon-bridge-db
- ZKEVM_BRIDGE_DATABASE_PORT=5432
volumes:
- ./test/test.keystore.claimtx:/pk/keystore.claimtxmanager
Expand All @@ -154,15 +154,15 @@ services:
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-bridge run --cfg /app/config.toml"
- "/app/xagon-bridge run --cfg /app/config.toml"

zkevm-bridge-kafka-consumer:
container_name: zkevm-bridge-kafka-consumer
xagon-bridge-kafka-consumer:
container_name: xagon-bridge-kafka-consumer
image: xagon-bridge-service
volumes:
- ./config/config.local.toml:/app/config.toml
- ./coinmiddleware/root-ca-cert:/app/root-ca-cert
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-bridge runKafkaConsumer --cfg /app/config.toml"
- "/app/xagon-bridge runKafkaConsumer --cfg /app/config.toml"
12 changes: 6 additions & 6 deletions docs/running_local.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

This documentation will help you running the following components:

- zkEVM Node Databases
- zkEVM Bridge Database
- Xagon Node Databases
- Xagon Bridge Database
- L1 Network
- Prover
- zkEVM Node
- zkEVM Bridge Service
- Xagon Node
- Xagon Bridge Service

## Requirements

Expand Down Expand Up @@ -53,15 +53,15 @@ make test-edge

## Accessing the environment

- zkEVM Bridge Database
- Xagon Bridge Database
- `Type:` Postgres DB
- `User:` test_user
- `Password:` test_password
- `Database:` test_db
- `Host:` localhost
- `Port:` 5435
- `Url:` <postgres://test_user:test_password@localhost:5435/test_db>
- zkEVM Bridge Service
- Xagon Bridge Service
- `Type:` Web
- `Host:` localhost
- `Port:` 8080
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func main() {
app := cli.NewApp()
app.Name = "zkevm-bridge-scripts"
app.Name = "xagon-bridge-scripts"
app.Commands = []*cli.Command{
{
Name: "updatedeps",
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/initialClaim/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 polygonZkEvm address in L1
`zkevmAddr` is the xagonZkEvm 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
Expand Down
Loading