diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index c7c848431c..edfd419d44 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -1,6 +1,6 @@ --- name: Report a bug -about: Something with Polygon zkEVM is not working as expected +about: Something with Xagon is not working as expected title: '' labels: 'type:bug' assignees: '' @@ -8,7 +8,7 @@ assignees: '' #### System information -zkEVM Node version: `v0.0.X-RCXX` +Xagon Node version: `v0.0.X-RCXX` OS & Version: `Windows/Linux/OSX` Commit hash : (if `develop`) Network: `Mainnet/Testnet` diff --git a/.github/workflows/test-from-prover.yml b/.github/workflows/test-from-prover.yml index ca917668a4..9407e47d5e 100644 --- a/.github/workflows/test-from-prover.yml +++ b/.github/workflows/test-from-prover.yml @@ -25,7 +25,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - repository: 0xPolygonHermez/zkevm-node + repository: okx/xagon-node - name: Install Go uses: actions/setup-go@v3 diff --git a/Dockerfile b/Dockerfile index 69829d3151..c093a8a6bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,8 @@ RUN cd /src && make build # CONTAINER FOR RUNNING BINARY FROM alpine:3.18.0 -COPY --from=build /src/dist/zkevm-node /app/zkevm-node +COPY --from=build /src/dist/xagon-node /app/xagon-node COPY --from=build /src/config/environments/testnet/node.config.toml /app/example.config.toml RUN apk update && apk add postgresql15-client EXPOSE 8123 -CMD ["/bin/sh", "-c", "/app/zkevm-node run"] +CMD ["/bin/sh", "-c", "/app/xagon-node run"] diff --git a/Makefile b/Makefile index 363dceea94..f480cd0eaf 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ endif GOBASE := $(shell pwd) GOBIN := $(GOBASE)/dist GOENVVARS := GOBIN=$(GOBIN) CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) -GOBINARY := zkevm-node +GOBINARY := xagon-node GOCMD := $(GOBASE)/cmd LDFLAGS += -X 'github.com/0xPolygonHermez/zkevm-node.Version=$(VERSION)' @@ -35,21 +35,21 @@ build: ## Builds the binary locally into ./dist .PHONY: build-docker build-docker: ## Builds a docker image with the node binary - docker build -t zkevm-node -f ./Dockerfile . + docker build -t xagon-node -f ./Dockerfile . .PHONY: build-docker-nc build-docker-nc: ## Builds a docker image with the node binary - but without build cache - docker build --no-cache=true -t zkevm-node -f ./Dockerfile . + docker build --no-cache=true -t xagon-node -f ./Dockerfile . .PHONY: run-rpc run-rpc: ## Runs all the services need to run a local zkEMV RPC node - docker-compose up -d zkevm-state-db zkevm-pool-db + docker-compose up -d xagon-state-db xagon-pool-db sleep 2 - docker-compose up -d zkevm-prover + docker-compose up -d xagon-prover sleep 5 - docker-compose up -d zkevm-sync + docker-compose up -d xagon-sync sleep 2 - docker-compose up -d zkevm-rpc + docker-compose up -d xagon-rpc .PHONY: stop stop: ## Stops all services diff --git a/README.md b/README.md index e5a802d6f0..0f66ac876c 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# zkEVM Node +# Xagon Node -zkEVM Node is a Go implementation of a node that operates the Polygon zkEVM Network. +Xagon Node is a Go implementation of a node that operates the Xagon Network. -## About the Polygon zkEVM network +## About the Xagon network -Since this is an implementation of a protocol it's fundamental to understand it, [here](https://zkevm.polygon.technology/docs/zknode/zknode-overview) you can find the specification of the protocol. +Since this is an implementation of a protocol it's fundamental to understand it, [here]() you can find the specification of the protocol. Glossary: - L1: Base blockchain where the rollup smart contracts are deployed. It's Ethereum or a testnet of Ethereum, but it could be any EVM compatible blockchain. -- L2: the rollup network aka the Polygon zkEVM network. -- Batch: a group of transactions that are executed/proved, using the [zkEVM prover](https://github.com/0xPolygonHermez/zkevm-prover) and sent to / synchronized from L1 +- L2: the rollup network aka the Xagon network. +- Batch: a group of transactions that are executed/proved, using the [Xagon prover]() and sent to / synchronized from L1 - Sequencer: the actor that is responsible for selecting transactions, putting them in a specific order, and sending them in batches to L1 - Trusted sequencer: sequencer that has special privileges, there can only be one trusted sequencer. The privileges granted to the trusted sequencer allow it to forecast the batches that will be applied to L1. This way it can commit to a specific sequence before interacting with L1. This is done to achieve fast finality and reduce costs associated with using the network (lower gas fees) - Permissionless sequencer: sequencer role that can be performed by anyone. It has competitive disadvantages compared to the trusted sequencer (slow finality, MEV attacks). Its main purpose is to provide censorship resistance and unstoppability features to the network. @@ -20,9 +20,9 @@ Glossary: - Trusted state: state reached through processing transactions that have been shared by the trusted sequencer. This state is considered trusted as the trusted sequencer could commit to a certain sequence, and then send a different one to L1 - Virtual state: state reached through processing transactions that have already been submitted to L1. These transactions are sent in batches by either trusted or permissionless sequencers. Those batches are also called virtual batches. Note that this state is trustless as it relies on L1 security assumptions - Consolidated state: state that is proven on-chain by submitting a ZKP (Zero Knowledge Proof) that proves the execution of a sequence of the last virtual batch. -- Invalid transaction: a transaction that can't be processed and doesn't affect the state. Note that such a transaction could be included in a virtual batch. The reason for a transaction to be invalid could be related to the Ethereum protocol (invalid nonce, not enough balance, ...) or due to limitations introduced by the zkEVM (each batch can make use of a limited amount of resources such as the total amount of keccak hashes that can be computed) +- Invalid transaction: a transaction that can't be processed and doesn't affect the state. Note that such a transaction could be included in a virtual batch. The reason for a transaction to be invalid could be related to the Ethereum protocol (invalid nonce, not enough balance, ...) or due to limitations introduced by the Xagon (each batch can make use of a limited amount of resources such as the total amount of keccak hashes that can be computed) - Reverted transaction: a transaction that is executed, but is reverted (because of smart contract logic). The main difference with *invalid transaction* is that this transaction modifies the state, at least to increment nonce of the sender. -- Proof of Efficiency (PoE): name of the protocol used by the network, it's enforced by the [smart contracts](https://github.com/0xPolygonHermez/zkevm-contracts) +- Proof of Efficiency (PoE): name of the protocol used by the network, it's enforced by the [smart contracts](https://github.com/okx/xagon-contracts) ## Architecture @@ -41,10 +41,10 @@ The diagram represents the main components of the software and how they interact - State: Responsible for managing the state data (batches, blocks, transactions, ...) that is stored on the `state SB`. It also handles the integration with the `executor` and the `Merkletree` service - State DB: persistence layer for the state data (except the Merkletree that is handled by the `Merkletree` service) - Aggregator: consolidates batches by generating ZKPs (Zero Knowledge proofs). To do so it gathers the necessary data that the `prover` needs as input through the `state` and sends a request to it. Once the proof is generated it's sent to Ethereum through the `etherman` -- Prover/Executor: service that generates ZK proofs. Note that this component is not implemented in this repository, and it's treated as a "black box" from the perspective of the node. The prover/executor has two implementations: [JS reference implementation](https://github.com/0xPolygonHermez/zkevm-proverjs) and [C production-ready implementation](https://github.com/0xPolygonHermez/zkevm-prover). Although it's the same software/service, it has two very different purposes: +- Prover/Executor: service that generates ZK proofs. Note that this component is not implemented in this repository, and it's treated as a "black box" from the perspective of the node. The prover/executor has two implementations: [JS reference implementation](https://github.com/0xPolygonHermez/zkevm-proverjs) and [C production-ready implementation](https://github.com/okx/xagon-prover). Although it's the same software/service, it has two very different purposes: - Provide an EVM implementation that allows processing transactions and getting all needed results metadata (state root, receipts, logs, ...) - Generate ZKPs -- Merkletree: service that stores the Merkletree, containing all the account information (balances, nonces, smart contract code, and smart contract storage). This component is also not implemented in this repo and is consumed as an external service by the node. The implementation can be found [here](https://github.com/0xPolygonHermez/zkevm-prover) +- Merkletree: service that stores the Merkletree, containing all the account information (balances, nonces, smart contract code, and smart contract storage). This component is also not implemented in this repo and is consumed as an external service by the node. The implementation can be found [here](https://github.com/okx/xagon-prover) ## Roles of the network @@ -63,8 +63,8 @@ Required services and components: There must be only one synchronizer, and it's recommended that it has exclusive access to an executor instance, although it's not necessary. This role can perfectly be run in a single instance, however, the JSON RPC and executor services can benefit from running in multiple instances, if the performance decreases due to the number of requests received -- [`zkEVM RPC endpoints`](./docs/json-rpc-endpoints.md) -- [`zkEVM RPC Custom endpoints documentation`](./docs/zkEVM-custom-endpoints.md) +- [`Xagon RPC endpoints`](./docs/json-rpc-endpoints.md) +- [`Xagon RPC Custom endpoints documentation`](./docs/zkEVM-custom-endpoints.md) ### Trusted sequencer diff --git a/config/default.go b/config/default.go index 305e16a677..2f0b20c60a 100644 --- a/config/default.go +++ b/config/default.go @@ -15,7 +15,7 @@ Outputs = ["stderr"] User = "state_user" Password = "state_password" Name = "state_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -36,7 +36,7 @@ FreeGasAddress = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" User = "pool_user" Password = "pool_password" Name = "pool_db" - Host = "zkevm-pool-db" + Host = "xagon-pool-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -141,10 +141,10 @@ CleanHistoryPeriod = "1h" CleanHistoryTimeRetention = "5m" [MTClient] -URI = "zkevm-prover:50061" +URI = "xagon-prover:50061" [Executor] -URI = "zkevm-prover:50071" +URI = "xagon-prover:50071" MaxResourceExhaustedAttempts = 3 WaitOnResourceExhaustion = "1s" MaxGRPCMessageSize = 100000000 @@ -158,7 +158,7 @@ Enabled = false User = "prover_user" Password = "prover_pass" Name = "prover_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 diff --git a/config/environments/local/local.node.config.toml b/config/environments/local/local.node.config.toml index 23ff957f3b..f2c75963e4 100644 --- a/config/environments/local/local.node.config.toml +++ b/config/environments/local/local.node.config.toml @@ -10,7 +10,7 @@ Outputs = ["stderr"] User = "state_user" Password = "state_password" Name = "state_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -29,7 +29,7 @@ FreeGasAddress = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" User = "pool_user" Password = "pool_password" Name = "pool_db" - Host = "zkevm-pool-db" + Host = "xagon-pool-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -47,7 +47,7 @@ Port = 8545 ReadTimeout = "60s" WriteTimeout = "60s" MaxRequestsPerIPAndSecond = 5000 -SequencerNodeURI = "https://internal.zkevm-test.net:2083/" +SequencerNodeURI = "https://internal.xagon-test.net:2083/" EnableL2SuggestedGasPricePolling = true [RPC.WebSockets] Enabled = true @@ -142,10 +142,10 @@ MaxGasPriceWei = 0 #L2CoinId = 7184 [MTClient] -URI = "zkevm-prover:50061" +URI = "xagon-prover:50061" [Executor] -URI = "zkevm-prover:50071" +URI = "xagon-prover:50071" MaxResourceExhaustedAttempts = 3 WaitOnResourceExhaustion = "1s" MaxGRPCMessageSize = 100000000 @@ -162,7 +162,7 @@ ProfilingEnabled = false User = "prover_user" Password = "prover_pass" Name = "prover_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 diff --git a/config/environments/mainnet/node.config.toml b/config/environments/mainnet/node.config.toml index 2b57364743..5ae1aefd7c 100644 --- a/config/environments/mainnet/node.config.toml +++ b/config/environments/mainnet/node.config.toml @@ -7,7 +7,7 @@ Outputs = ["stderr"] User = "state_user" Password = "state_password" Name = "state_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -24,7 +24,7 @@ FreeGasAddress = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" User = "pool_user" Password = "pool_password" Name = "pool_db" - Host = "zkevm-pool-db" + Host = "xagon-pool-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -42,7 +42,7 @@ Port = 8545 ReadTimeout = "60s" WriteTimeout = "60s" MaxRequestsPerIPAndSecond = 5000 -SequencerNodeURI = "https://zkevm-rpc.com" +SequencerNodeURI = "https://xagon-rpc.com" EnableL2SuggestedGasPricePolling = false [RPC.WebSockets] Enabled = true @@ -54,10 +54,10 @@ SyncChunkSize = 100 TrustedSequencerURL = "" # If it is empty or not specified, then the value is read from the smc [MTClient] -URI = "zkevm-prover:50061" +URI = "xagon-prover:50061" [Executor] -URI = "zkevm-prover:50071" +URI = "xagon-prover:50071" MaxResourceExhaustedAttempts = 3 WaitOnResourceExhaustion = "1s" MaxGRPCMessageSize = 100000000 @@ -74,7 +74,7 @@ ProfilingEnabled = false User = "prover_user" Password = "prover_pass" Name = "prover_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 \ No newline at end of file diff --git a/config/environments/testnet/node.config.toml b/config/environments/testnet/node.config.toml index ce92060b3c..2a6094dcb1 100644 --- a/config/environments/testnet/node.config.toml +++ b/config/environments/testnet/node.config.toml @@ -7,7 +7,7 @@ Outputs = ["stderr"] User = "state_user" Password = "state_password" Name = "state_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -26,7 +26,7 @@ FreeGasAddress = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" User = "pool_user" Password = "pool_password" Name = "pool_db" - Host = "zkevm-pool-db" + Host = "xagon-pool-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -44,7 +44,7 @@ Port = 8545 ReadTimeout = "60s" WriteTimeout = "60s" MaxRequestsPerIPAndSecond = 5000 -SequencerNodeURI = "https://rpc.public.zkevm-test.net/" +SequencerNodeURI = "https://rpc.public.xagon-test.net/" EnableL2SuggestedGasPricePolling = false [RPC.WebSockets] Enabled = true @@ -55,10 +55,10 @@ SyncInterval = "2s" SyncChunkSize = 100 [MTClient] -URI = "zkevm-prover:50061" +URI = "xagon-prover:50061" [Executor] -URI = "zkevm-prover:50071" +URI = "xagon-prover:50071" MaxResourceExhaustedAttempts = 3 WaitOnResourceExhaustion = "1s" MaxGRPCMessageSize = 100000000 @@ -75,7 +75,7 @@ ProfilingEnabled = false User = "prover_user" Password = "prover_pass" Name = "prover_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index c9a2f4bd6d..cb6d97b5d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,19 +1,19 @@ version: "3.5" networks: default: - name: zkevm + name: Xagon services: - zkevm-rpc: - container_name: zkevm-rpc + xagon-rpc: + container_name: xagon-rpc restart: unless-stopped depends_on: - zkevm-pool-db: + xagon-pool-db: condition: service_healthy - zkevm-state-db: + xagon-state-db: condition: service_healthy - zkevm-sync: + xagon-sync: condition: service_started - image: zkevm-node + image: xagon-node deploy: resources: limits: @@ -30,15 +30,15 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network ${ZKEVM_NETWORK} --cfg /app/config.toml --components rpc" + - "/app/xagon-node run --network ${ZKEVM_NETWORK} --cfg /app/config.toml --components rpc" - zkevm-sync: - container_name: zkevm-sync + xagon-sync: + container_name: xagon-sync restart: unless-stopped depends_on: - zkevm-state-db: + xagon-state-db: condition: service_healthy - image: zkevm-node + image: xagon-node ports: - 9092:9091 # needed if metrics enabled deploy: @@ -54,10 +54,10 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network ${ZKEVM_NETWORK} --cfg /app/config.toml --components synchronizer" + - "/app/xagon-node run --network ${ZKEVM_NETWORK} --cfg /app/config.toml --components synchronizer" - zkevm-state-db: - container_name: zkevm-state-db + xagon-state-db: + container_name: xagon-state-db restart: unless-stopped image: postgres:15 healthcheck: @@ -82,8 +82,8 @@ services: - "-c" - "config_file=/etc/postgresql.conf" - zkevm-pool-db: - container_name: zkevm-pool-db + xagon-pool-db: + container_name: xagon-pool-db restart: unless-stopped image: postgres:15 healthcheck: @@ -104,12 +104,12 @@ services: - "-N" - "500" - zkevm-prover: - container_name: zkevm-prover + xagon-prover: + container_name: xagon-prover restart: unless-stopped - image: hermeznetwork/zkevm-prover:v2.2.0 + image: hermeznetwork/xagon-prover:v2.2.0 depends_on: - zkevm-state-db: + xagon-state-db: condition: service_healthy ports: - 50061:50061 # MT diff --git a/docs/ci/actions.md b/docs/ci/actions.md index 821c6edcea..fbf81cba74 100644 --- a/docs/ci/actions.md +++ b/docs/ci/actions.md @@ -60,7 +60,7 @@ PR opened and pushing changes to PRs. There are two variants, `trusted` and ## updatedeps -The `zkevm-node` repo requires some external resources for working. We call +The `xagon-node` repo requires some external resources for working. We call these resources custom dependencies (as opposed to the golang packages required by the code). @@ -80,7 +80,7 @@ for changes the client/server golang code is generated from them. With all the potential changes we create a new PR and the tests are run on it, so that we can review and eventually approve the changes to be included in the -`zkevm-node` repo. +`xagon-node` repo. ### When is executed diff --git a/docs/components/account_keystore.md b/docs/components/account_keystore.md index ea2f15dbe6..b6ba273ebf 100644 --- a/docs/components/account_keystore.md +++ b/docs/components/account_keystore.md @@ -3,10 +3,10 @@ This file contains your Ethereum L1 private key, but it will be encrypted at rest using a password of your choice. The ZKEVM Node - depending on which operating mode it's set up - will use this file in conjunction with the password to authorize L1 transactions. ```bash -docker run --rm hermeznetwork/zkevm-node:latest sh -c "/app/zkevm-node encryptKey --pk=[your private key] --pw=[password to encrypt file] --output=./keystore; cat ./keystore/*" > account.keystore +docker run --rm okx/xagon-node:latest sh -c "/app/xagon-node encryptKey --pk=[your private key] --pw=[password to encrypt file] --output=./keystore; cat ./keystore/*" > account.keystore ``` **NOTE**: - Replace `[your private key]` with your Ethereum L1 account private key -- Replace `[password to encrypt file]` with a password used for file encryption. This password must be passed to the Node later on via env variable (`ZKEVM_NODE_ETHERMAN_PRIVATEKEYPASSWORD`) +- Replace `[password to encrypt file]` with a password used for file encryption. This password must be passed to the Node later on via env variable (`XAGON_NODE_ETHERMAN_PRIVATEKEYPASSWORD`) diff --git a/docs/components/aggregator.md b/docs/components/aggregator.md index a1c314a22e..e8eee3a79c 100644 --- a/docs/components/aggregator.md +++ b/docs/components/aggregator.md @@ -1,8 +1,8 @@ # Component: Aggregator -## ZKEVM Aggregator: +## XAGON Aggregator: -The ZKEVM Aggregator is an optional module responsible for receiving connections from Prover(s) in order to generate the proofs for the batches not proven yet. +The XAGON Aggregator is an optional module responsible for receiving connections from Prover(s) in order to generate the proofs for the batches not proven yet. ## Hard dependencies: @@ -12,33 +12,33 @@ The ZKEVM Aggregator is an optional module responsible for receiving connections ## Running: -The preferred way to run the ZKEVM Aggregator component is via Docker and Docker Compose. +The preferred way to run the XAGON Aggregator component is via Docker and Docker Compose. ```bash -docker pull hermeznetwork/zkevm-node +docker pull okx/xagon-node ``` -To orchestrate multiple deployments of the different ZKEVM Node components, a `docker-compose.yaml` file for Docker Compose can be used: +To orchestrate multiple deployments of the different XAGON Node components, a `docker-compose.yaml` file for Docker Compose can be used: ```yaml - zkevm-aggregator: - container_name: zkevm-aggregator - image: zkevm-node + xagon-aggregator: + container_name: xagon-aggregator + image: xagon-node command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --genesis /app/genesis.json --cfg /app/config.toml --components aggregator" + - "/app/xagon-node run --genesis /app/genesis.json --cfg /app/config.toml --components aggregator" ``` The container alone needs some parameters configured, access to certain configuration files and the appropriate ports exposed. - volumes: - - `your Account Keystore file`: /pk/keystore (note, this `/pk/keystore` value is the default path that's written in the Public Configuration files on this repo, meant to expedite deployments, it can be superseded via an env flag `ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH`.) + - `your Account Keystore file`: /pk/keystore (note, this `/pk/keystore` value is the default path that's written in the Public Configuration files on this repo, meant to expedite deployments, it can be superseded via an env flag `XAGON_NODE_ETHERMAN_PRIVATEKEYPATH`.) - `your config.toml file`: /app/config.toml - `your genesis.json file`: /app/genesis.json - environment: Env variables that supersede the config file - - `ZKEVM_NODE_STATEDB_HOST`: Name of StateDB Database Host + - `XAGON_NODE_STATEDB_HOST`: Name of StateDB Database Host ### The Account Keystore file: diff --git a/docs/components/databases.md b/docs/components/databases.md index 37e5ee5a92..d6c16aa8e4 100644 --- a/docs/components/databases.md +++ b/docs/components/databases.md @@ -12,11 +12,11 @@ Note the `environment` values will change per DB. The StateDB needs to generate some extra databases and tables (`merkletree`) for use with the MerkleTree/Executor service. -This is done via an sql file: [init_prover_db.sql](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/db/scripts/init_prover_db.sql) +This is done via an sql file: [init_prover_db.sql](https://github.com/okx/xagon-node/blob/develop/db/scripts/init_prover_db.sql) ```yaml -zkevm-state-db: - container_name: zkevm-state-db +xagon-state-db: + container_name: xagon-state-db image: postgres:15 deploy: resources: @@ -38,8 +38,8 @@ zkevm-state-db: - **Other DBs: Pool/RPC**: ```yaml - zkevm-pool-db: - container_name: zkevm-pool-db + xagon-pool-db: + container_name: xagon-pool-db image: postgres:15 deploy: resources: diff --git a/docs/components/prover.md b/docs/components/prover.md index eedc0d088f..aa5385ad22 100644 --- a/docs/components/prover.md +++ b/docs/components/prover.md @@ -1,10 +1,10 @@ # Component: Prover -NOTE: The Prover is not considered part of the ZKEVM Node and all issues and suggestions should be sent to the [Prover repo](https://github.com/0xPolygonHermez/zkevm-prover/). +NOTE: The Prover is not considered part of the XAGON Node and all issues and suggestions should be sent to the [Prover repo](https://github.com/okx/xagon-prover/). -## ZKEVM Prover: +## XAGON Prover: -The ZKEVM Prover image hosts different components, *Merkle Tree*, *Executor* and finally the actual *Prover*. +The XAGON Prover image hosts different components, *Merkle Tree*, *Executor* and finally the actual *Prover*. ## Hard dependencies: @@ -12,18 +12,18 @@ The ZKEVM Prover image hosts different components, *Merkle Tree*, *Executor* and ## Running: -The preferred way to run the ZKEVM Prover component is via Docker and Docker Compose. +The preferred way to run the XAGON Prover component is via Docker and Docker Compose. ```bash -docker pull hermeznetwork/zkevm-prover +docker pull hermeznetwork/xagon-prover ``` -To orchestrate multiple deployments of the different ZKEVM Node components, a `docker-compose.yaml` file for Docker Compose can be used: +To orchestrate multiple deployments of the different XAGON Node components, a `docker-compose.yaml` file for Docker Compose can be used: ```yaml - zkevm-prover: - container_name: zkevm-prover - image: zkevm-prover + xagon-prover: + container_name: xagon-prover + image: xagon-prover volumes: - ./prover-config.json:/usr/src/app/config.json command: > diff --git a/docs/components/rpc.md b/docs/components/rpc.md index 3725ed0436..b811593a82 100644 --- a/docs/components/rpc.md +++ b/docs/components/rpc.md @@ -1,8 +1,8 @@ # Component: RPC -## ZKEVM RPC: +## XAGON RPC: -The ZKEVM RPC relays transactions to the Trusted sequencer. +The XAGON RPC relays transactions to the Trusted sequencer. ## Hard dependencies: @@ -13,22 +13,22 @@ The ZKEVM RPC relays transactions to the Trusted sequencer. ## Running: -The preferred way to run the ZKEVM RPC component is via Docker and Docker Compose. +The preferred way to run the XAGON RPC component is via Docker and Docker Compose. ```bash -docker pull hermeznetwork/zkevm-node +docker pull okx/xagon-node ``` -To orchestrate multiple deployments of the different ZKEVM Node components, a `docker-compose.yaml` file for Docker Compose can be used: +To orchestrate multiple deployments of the different XAGON Node components, a `docker-compose.yaml` file for Docker Compose can be used: ```yaml - zkevm-rpc: - container_name: zkevm-rpc - image: zkevm-node + xagon-rpc: + container_name: xagon-rpc + image: xagon-node command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --genesis /app/genesis.json --cfg /app/config.toml --components rpc" + - "/app/xagon-node run --genesis /app/genesis.json --cfg /app/config.toml --components rpc" ``` The container alone needs some parameters configured, access to certain configuration files and the appropriate ports exposed. @@ -37,9 +37,9 @@ The container alone needs some parameters configured, access to certain configur - `8545:8545`: RPC Port - `9091:9091`: Needed if Prometheus metrics are enabled - environment: Env variables that supersede the config file - - `ZKEVM_NODE_STATEDB_HOST`: Name of StateDB Database Host - - `ZKEVM_NODE_POOL_HOST`: Name of PoolDB Database Host - - `ZKEVM_NODE_RPC_DB_HOST`: Name of RPCDB Database Host + - `XAGON_NODE_STATEDB_HOST`: Name of StateDB Database Host + - `XAGON_NODE_POOL_HOST`: Name of PoolDB Database Host + - `XAGON_NODE_RPC_DB_HOST`: Name of RPCDB Database Host - volumes: - `your config.toml file`: /app/config.toml - `your genesis file`: /app/genesis.json diff --git a/docs/components/sequencer.md b/docs/components/sequencer.md index 3490494de7..6299e72f77 100644 --- a/docs/components/sequencer.md +++ b/docs/components/sequencer.md @@ -1,27 +1,27 @@ # Component: Sequencer -## ZKEVM Sequencer: +## Xagon Sequencer: -The ZKEVM Sequencer is an optional but ancillary module that proposes new batches using transactions stored in the Pool Database. +The Xagon Sequencer is an optional but ancillary module that proposes new batches using transactions stored in the Pool Database. ## Running: -The preferred way to run the ZKEVM Sequencer component is via Docker and Docker Compose. +The preferred way to run the Xagon Sequencer component is via Docker and Docker Compose. ```bash -docker pull hermeznetwork/zkevm-node +docker pull okx/xagon-node ``` -To orchestrate multiple deployments of the different ZKEVM Node components, a `docker-compose.yaml` file for Docker Compose can be used: +To orchestrate multiple deployments of the different Xagon Node components, a `docker-compose.yaml` file for Docker Compose can be used: ```yaml - zkevm-sequencer: - container_name: zkevm-sequencer - image: zkevm-node + xagon-sequencer: + container_name: xagon-sequencer + image: xagon-node command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --genesis /app/genesis.json --cfg /app/config.toml --components sequencer" + - "/app/xagon-node run --genesis /app/genesis.json --cfg /app/config.toml --components sequencer" ``` The container alone needs some parameters configured, access to certain configuration files and the appropriate ports exposed. diff --git a/docs/components/synchronizer.md b/docs/components/synchronizer.md index 0e79e52a37..ca9e01b4a9 100644 --- a/docs/components/synchronizer.md +++ b/docs/components/synchronizer.md @@ -1,31 +1,31 @@ # Component: Synchronizer -## ZKEVM Synchronizer: +## XAGON Synchronizer: -The ZKEVM Synchronizer is the **base** component for which all others will depend on. You can *mix and match* different components to achieve a different outcome, be it sending transactions or computing proofs, but the Sync module will need to be up and running. +The XAGON Synchronizer is the **base** component for which all others will depend on. You can *mix and match* different components to achieve a different outcome, be it sending transactions or computing proofs, but the Sync module will need to be up and running. -This module syncs data between the Layer 1 Ethereum network and ZKEVM L2 network. +This module syncs data between the Layer 1 Ethereum network and XAGON L2 network. ## Running: -The preferred way to run the ZKEVM Synchronizer component is via Docker and Docker Compose. +The preferred way to run the XAGON Synchronizer component is via Docker and Docker Compose. ```bash -docker pull hermeznetwork/zkevm-node +docker pull hermeznetwork/xagon-node ``` -To orchestrate multiple deployments of the different ZKEVM Node components, a `docker-compose.yaml` file for Docker Compose can be used: +To orchestrate multiple deployments of the different XAGON Node components, a `docker-compose.yaml` file for Docker Compose can be used: **THIS STEP IS MANDATORY ON ALL DEPLOYMENT MODES** ```yaml - zkevm-sync: - container_name: zkevm-sync - image: zkevm-node + xagon-sync: + container_name: xagon-sync + image: xagon-node command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --genesis /app/genesis.json --cfg /app/config.toml --components synchronizer" + - "/app/xagon-node run --genesis /app/genesis.json --cfg /app/config.toml --components synchronizer" ``` The container alone needs some parameters configured, access to certain configuration files and the appropriate ports exposed. diff --git a/docs/configuration.md b/docs/configuration.md index a61bcac3c8..ed1f43721c 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -35,7 +35,7 @@ For details about the contents you can read specifications [here](config-file/cu ### Prover Config -Please check [prover repository](https://github.com/0xPolygonHermez/zkevm-prover) for further information +Please check [prover repository](https://github.com/okx/xagon-prover) for further information Examples: - `config/environments/mainnet/prover.config.json` diff --git a/docs/networks.md b/docs/networks.md index d4ce7c907c..49d8660ed3 100644 --- a/docs/networks.md +++ b/docs/networks.md @@ -1,5 +1,5 @@ -# zkEVM testnet networks +# Xagon testnet networks | Network Name | ChainID | RPC URL | Explorer | Bridge Info | |--------------|---------|---------|----------|------------------| -| Public Testnet | `1402` | https://rpc.public.zkevm-test.net | https://explorer.public.zkevm-test.net | https://public.zkevm-test.net/ \ No newline at end of file +| Public Testnet | `1402` | https://rpc.public.xagon-test.net | https://explorer.public.xagon-test.net | https://public.xagon-test.net/ \ No newline at end of file diff --git a/docs/production-setup.md b/docs/production-setup.md index 790c508421..8fa5da8d4b 100644 --- a/docs/production-setup.md +++ b/docs/production-setup.md @@ -9,14 +9,14 @@ Note that sequencing and proving functionalities are not covered in this documen ## Requirements -- A machine to run the zkEVM node with the following requirements: +- A machine to run the XAGON node with the following requirements: - Hardware: 32G RAM, 4 cores, 128G Disk with high IOPS (as the network is super young the current disk requirements are quite low, but they will increase overtime. Also note that this requirement is true if the DBs run on the same machine, but it's recommended to run Postgres on dedicated infra). Currently ARM-based CPUs are not supported - Software: Ubuntu 22.04, Docker -- A L1 node: we recommend using geth, but what it's actually needed is access to a JSON RPC interface for the L1 network (Goerli for zkEVM testnet, Ethereum mainnet for zkEVM mainnet) +- A L1 node: we recommend using geth, but what it's actually needed is access to a JSON RPC interface for the L1 network (Goerli for XAGON testnet, Ethereum mainnet for XAGON mainnet) ## Setup -This is the most straightforward path to run a zkEVM node, and it's perfectly fine for most use cases, however if you are interested in providing service to many users it's recommended to do some tweaking over the default configuration. Furthermore, this is quite opinionated, feel free to run this software in a different way, for instance it's not needed to use Docker, you could use the Go and C++ binaries directly. +This is the most straightforward path to run a XAGON node, and it's perfectly fine for most use cases, however if you are interested in providing service to many users it's recommended to do some tweaking over the default configuration. Furthermore, this is quite opinionated, feel free to run this software in a different way, for instance it's not needed to use Docker, you could use the Go and C++ binaries directly. tl;dr: @@ -25,7 +25,7 @@ tl;dr: ZKEVM_NET=mainnet ZKEVM_DIR=./path/to/install # CHANGE THIS ZKEVM_CONFIG_DIR=./path/to/config # CHANGE THIS -curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip +curl -L https://github.com/okx/xagon-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_DIR.zip -d $ZKEVM_DIR && rm $ZKEVM_DIR.zip mkdir -p $ZKEVM_CONFIG_DIR && cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env # EDIT THIS env file: @@ -41,9 +41,9 @@ docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker 2. Define installation path: `ZKEVM_DIR=./path/to/install` 3. Define a config directory: `ZKEVM_CONFIG_DIR=./path/to/config` 4. It's recommended to source this env vars in your `~/.bashrc`, `~/.zshrc` or whatever you're using -5. Download and extract the artifacts: `curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip`. Note you may need to install `unzip` for this command to work. +5. Download and extract the artifacts: `curl -L https://github.com/okx/xagon-node/releases/latest/download/$XAGON_NET.zip > $XAGON_NET.zip && unzip -o $XAGON_NET.zip -d $XAGON_DIR && rm $XAGON_NET.zip`. Note you may need to install `unzip` for this command to work. -> **NOTE:** Take into account this works for the latest release (mainnet), in case you want to deploy a pre-release (testnet) you should get the artifacts directly for that release and not using the "latest" link depicted here. [Here](https://github.com/0xPolygonHermez) you can check the node release deployed for each network. +> **NOTE:** Take into account this works for the latest release (mainnet), in case you want to deploy a pre-release (testnet) you should get the artifacts directly for that release and not using the "latest" link depicted here. [Here](https://github.com/okx) you can check the node release deployed for each network. 6. Copy the file with the env parameters into config directory: `mkdir -p $ZKEVM_CONFIG_DIR && cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env` 7. Edit the env file, with your favourite editor. The example will use nano: `nano $ZKEVM_CONFIG_DIR/.env`. This file contains the configuration that anyone should modify. For advanced configuration: @@ -52,11 +52,11 @@ docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker 3. Edit the different configuration files in the $ZKEVM_CONFIG_DIR directory and make the necessary changes 8. Run the node: `docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml up -d`. You may need to run this command using `sudo` depending on your Docker setup. 9. Make sure that all components are running: `docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml ps`. You should see the following containers: - 1. zkevm-rpc - 2. zkevm-sync - 3. zkevm-state-db - 4. zkevm-pool-db - 5. zkevm-prover + 1. xagon-rpc + 2. xagon-sync + 3. xagon-state-db + 4. xagon-pool-db + 5. xagon-prover If everything has gone as expected you should be able to run queries to the JSON RPC at `http://localhost:8545`. For instance you can run the following query that fetches the latest synchronized L2 block, if you call this every few seconds, you should see the number increasing: @@ -88,7 +88,7 @@ There are some fundamental changes that can be done towards the basic setup, in In the basic setup, there are Postgres being instanciated as Docker containers. For better performance is recommended to: - Run dedicated instances for Postgres. To achieve this you will need to: - - Remove the Postgres services (`zkevm-pool-db` and `zkevm-state-db`) from the `docker-compose.yml` + - Remove the Postgres services (`xagon-pool-db` and `xagon-state-db`) from the `docker-compose.yml` - Instantiate Postgres elsewhere (note that you will have to create credentials and run some queries to make this work, following the config files and docker-compose should give a clear idea of what to do) - Update the `node.config.toml` to use the correct URI for both DBs - Update `prover.config.json` to use the correct URI for the state DB @@ -101,5 +101,5 @@ Unlike the synchronizer, that needs to have only one instance running (having mo There can be as many instances of it as needed, but in order to not introduce other bottlenecks, it's important to consider the following: - Read replicas of the State DB should be used -- Synchronizer should have an exclusive instance of `zkevm-prover` -- JSON RPCs should scale in correlation with instances of `zkevm-prover`. The most obvious way to do so is by having a dedicated `zkevm-prover` for each `zkevm-rpc`. But depending on the payload of your solution it could be worth to have `1 zkevm-rpc : many zkevm-prover` or `many zkevm-rpc : 1 zkevm-prover`, ... For reference, the `zkevm-prover` implements the EVM, and therefore will be heavily used when calling endpoints such as `eth_call`. On the other hand, there are other endpoints that relay on the `zkevm-state-db` +- Synchronizer should have an exclusive instance of `xagon-prover` +- JSON RPCs should scale in correlation with instances of `xagon-prover`. The most obvious way to do so is by having a dedicated `xagon-prover` for each `xagon-rpc`. But depending on the payload of your solution it could be worth to have `1 xagon-rpc : many xagon-prover` or `many xagon-rpc : 1 xagon-prover`, ... For reference, the `xagon-prover` implements the EVM, and therefore will be heavily used when calling endpoints such as `eth_call`. On the other hand, there are other endpoints that relay on the `xagon-state-db` diff --git a/docs/running_local.md b/docs/running_local.md index f7c2d63464..7c433a8fcd 100644 --- a/docs/running_local.md +++ b/docs/running_local.md @@ -8,11 +8,11 @@ This documentation will help you running the following components: -- zkEVM Node Databases +- Xagon Node Databases - Explorer Databases - L1 Network - Prover -- zkEVM Node components +- Xagon Node components - Explorers ## Requirements @@ -23,8 +23,8 @@ The current version of the environment requires `go`, `docker` and `docker-compo - - -The `zkevm-node` docker image must be built at least once and every time a change is made to the code. -If you haven't build the `zkevm-node` image yet, you must run: +The `xagon-node` 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-node` image yet, you must run: ```bash make build-docker @@ -32,7 +32,7 @@ make build-docker ## A look at how the binary works: -The `zkevm-node` allows certain commands to interact with smart contracts, run certain components, create encryption files and print out debug information. +The `xagon-node` allows certain commands to interact with smart contracts, run certain components, create encryption files and print out debug information. To interact with the binary program we provide docker compose files, and a Makefile to spin up/down the different services and components, ensuring a smooth deployment locally and better interface in command line for developers. @@ -93,7 +93,7 @@ make run-approve-matic ## Accessing the environment - **Databases**: - - zkEVM Node *State* Database + - Xagon Node *State* Database - `Type:` Postgres DB - `User:` state_user - `Password:` state_password @@ -101,7 +101,7 @@ make run-approve-matic - `Host:` localhost - `Port:` 5432 - `Url:` - - zkEVM Node *Pool* Database + - Xagon Node *Pool* Database - `Type:` Postgres DB - `User:` pool_user - `Password:` pool_password @@ -109,7 +109,7 @@ make run-approve-matic - `Host:` localhost - `Port:` 5433 - `Url:` - - zkEVM Node *JSON-RPC* Database + - Xagon Node *JSON-RPC* Database - `Type:` Postgres DB - `User:` rpc_user - `Password:` rpc_password @@ -139,7 +139,7 @@ make run-approve-matic - `Host:` localhost - `Port:` 8545 - `Url:` - - zkEVM Node + - Xagon Node - `Type:` JSON RPC - `Host:` localhost - `Port:` 8123 @@ -173,7 +173,7 @@ To configure your Metamask to use your local environment, follow these steps: 3. On the left menu, click on Networks 4. Click on `Add Network` button 5. Fill up the L2 network information - 1. `Network Name:` Polygon zkEVM - Local + 1. `Network Name:` Xagon - Local 2. `New RPC URL:` 3. `ChainID:` 1001 4. `Currency Symbol:` ETH diff --git a/docs/snap_restore.md b/docs/snap_restore.md index 7d9de4c8b7..e468631dfe 100644 --- a/docs/snap_restore.md +++ b/docs/snap_restore.md @@ -11,10 +11,10 @@ This feature creates a dump of entire database ``` NAME: - zkevm-node snapshot - Snapshot the state db + xagon-node snapshot - Snapshot the state db USAGE: - zkevm-node snapshot [command options] [arguments...] + xagon-node snapshot [command options] [arguments...] OPTIONS: --cfg FILE, -c FILE Configuration FILE @@ -27,7 +27,7 @@ OPTIONS: User = "prover_user" Password = "prover_pass" Name = "prover_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -39,7 +39,7 @@ This generates two files in the current working path: #### Example of invocation: ``` -# cd /tmp/ && /app/zkevm-node snap -c /app/config.toml +# cd /tmp/ && /app/xagon-node snap -c /app/config.toml (...) # ls -1 prover_db_1689925019_v0.2.0-RC9-15-gd39e7f1e_d39e7f1e.sql.tar.gz @@ -56,10 +56,10 @@ It populates state, and hash databases with the previous backup ``` NAME: - zkevm-node restore - Restore snapshot of the state db + xagon-node restore - Restore snapshot of the state db USAGE: - zkevm-node restore [command options] [arguments...] + xagon-node restore [command options] [arguments...] OPTIONS: --inputfilestate value, --is value Input file stateDB @@ -70,16 +70,16 @@ OPTIONS: #### Example of invocation: ``` -/app/zkevm-node restore -c /app/config.toml --is /tmp/state_db_1689925019_v0.2.0-RC9-15-gd39e7f1e_d39e7f1e.sql.tar.gz --ih /tmp/prover_db_1689925019_v0.2.0-RC9-15-gd39e7f1e_d39e7f1e.sql.tar +/app/xagon-node restore -c /app/config.toml --is /tmp/state_db_1689925019_v0.2.0-RC9-15-gd39e7f1e_d39e7f1e.sql.tar.gz --ih /tmp/prover_db_1689925019_v0.2.0-RC9-15-gd39e7f1e_d39e7f1e.sql.tar .gz ``` # How to test -You could use `test/docker-compose.yml` to interact with `zkevm-node`: +You could use `test/docker-compose.yml` to interact with `xagon-node`: * Run the containers: `make run` * Launch a interactive container: ``` -docker-compose up -d zkevm-sh -docker-compose exec zkevm-sh /bin/sh +docker-compose up -d xagon-sh +docker-compose exec xagon-sh /bin/sh ``` * Inside this shell you can execute the examples of invocation diff --git a/docs/zkEVM-custom-endpoints.md b/docs/zkEVM-custom-endpoints.md index ef496c1df5..af654748b5 100644 --- a/docs/zkEVM-custom-endpoints.md +++ b/docs/zkEVM-custom-endpoints.md @@ -1,6 +1,6 @@ -# zkEVM custom endpoints +# Xagon custom endpoints -The zkEVM Node JSON RPC server works as is when compared to the official Ethereum JSON RPC, but there are some extra information that also needs to be shared when talking about a L2 Networks, in our case we have information about Batches, Proofs, L1 transactions and much more +The Xagon Node JSON RPC server works as is when compared to the official Ethereum JSON RPC, but there are some extra information that also needs to be shared when talking about a L2 Networks, in our case we have information about Batches, Proofs, L1 transactions and much more In order to allow users to consume this information, a custom set of endpoints were created to provide this information, they are provided under the prefix `zkevm_` diff --git a/sonar-project.properties b/sonar-project.properties index 6ddc88abf2..0fb23ac00f 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1 +1 @@ -sonar.projectKey=zkevm-node +sonar.projectKey=xagon-node diff --git a/test/config/grafana/dashboard-dockers.json b/test/config/grafana/dashboard-dockers.json index 555a5c09a4..f77499ab2f 100644 --- a/test/config/grafana/dashboard-dockers.json +++ b/test/config/grafana/dashboard-dockers.json @@ -573,14 +573,14 @@ "current": { "selected": true, "text": [ - "zkevm-json-rpc", - "zkevm-pool-db", - "zkevm-sequencer" + "xagon-json-rpc", + "xagon-pool-db", + "xagon-sequencer" ], "value": [ - "zkevm-json-rpc", - "zkevm-pool-db", - "zkevm-sequencer" + "xagon-json-rpc", + "xagon-pool-db", + "xagon-sequencer" ] }, "datasource": { diff --git a/test/config/test.node.config.toml b/test/config/test.node.config.toml index 88926ff512..8a2d21c11c 100644 --- a/test/config/test.node.config.toml +++ b/test/config/test.node.config.toml @@ -9,7 +9,7 @@ Outputs = ["stderr"] User = "state_user" Password = "state_password" Name = "state_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -27,13 +27,13 @@ PollMinAllowedGasPriceInterval = "15s" User = "pool_user" Password = "pool_password" Name = "pool_db" - Host = "zkevm-pool-db" + Host = "xagon-pool-db" Port = "5432" EnableLog = false MaxConns = 200 [Etherman] -URL = "http://zkevm-mock-l1-network:8545" +URL = "http://xagon-mock-l1-network:8545" ForkIDChunkSize = 20000 MultiGasProvider = false [Etherscan] @@ -129,10 +129,10 @@ DefaultGasPriceWei = 1000000000 MaxGasPriceWei = 0 [MTClient] -URI = "zkevm-prover:50061" +URI = "xagon-prover:50061" [Executor] -URI = "zkevm-prover:50071" +URI = "xagon-prover:50071" MaxGRPCMessageSize = 100000000 [Metrics] @@ -148,7 +148,7 @@ ProfilingEnabled = true User = "event_user" Password = "event_password" Name = "event_db" - Host = "zkevm-event-db" + Host = "xagon-event-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -157,7 +157,7 @@ ProfilingEnabled = true User = "prover_user" Password = "prover_pass" Name = "prover_db" -Host = "zkevm-state-db" +Host = "xagon-state-db" Port = "5432" EnableLog = false MaxConns = 200 diff --git a/test/dbutils/dbutils.go b/test/dbutils/dbutils.go index 2db5b20145..ceeaec4f15 100644 --- a/test/dbutils/dbutils.go +++ b/test/dbutils/dbutils.go @@ -11,7 +11,7 @@ import ( // InitOrResetState will initializes the State db running the migrations or // will reset all the known data and rerun the migrations func InitOrResetState(cfg db.Config) error { - return initOrReset(cfg, "zkevm-state-db") + return initOrReset(cfg, "xagon-state-db") } // InitOrResetPool will initializes the Pool db running the migrations or diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 1c52d5e3ff..2438b623a3 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.5" networks: default: - name: zkevm + name: Xagon services: grafana: @@ -13,8 +13,8 @@ services: - ./config/grafana/dashboard-dockers.json:/etc/grafana/provisioning/dashboards/dashboard-dockers.json:ro - ./config/grafana/dashboard-node.json:/etc/grafana/provisioning/dashboards/dashboard-node.json:ro environment: - - GF_SECURITY_ADMIN_USER=zkevm - - GF_SECURITY_ADMIN_PASSWORD=zkevm + - GF_SECURITY_ADMIN_USER=Xagon + - GF_SECURITY_ADMIN_PASSWORD=Xagon ports: - 3000:3000 depends_on: @@ -34,7 +34,7 @@ services: - POSTGRES_DB=grafana depends_on: - grafana-db - - zkevm-json-rpc + - xagon-json-rpc grafana-db: container_name: grafana-db @@ -46,26 +46,26 @@ services: - POSTGRES_PASSWORD=password - POSTGRES_DB=grafana - zkevm-sequencer: - container_name: zkevm-sequencer - image: zkevm-node + xagon-sequencer: + container_name: xagon-sequencer + image: xagon-node ports: - 9092:9091 # needed if metrics enabled - 6060:6060 environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db + - ZKEVM_NODE_STATEDB_HOST=xagon-state-db + - ZKEVM_NODE_POOL_DB_HOST=xagon-pool-db volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequencer" + - "/app/xagon-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequencer" - zkevm-sequence-sender: - container_name: zkevm-sequence-sender - image: zkevm-node + xagon-sequence-sender: + container_name: xagon-sequence-sender + image: xagon-node environment: - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db @@ -77,34 +77,34 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequence-sender" + - "/app/xagon-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequence-sender" - zkevm-json-rpc: - container_name: zkevm-json-rpc - image: zkevm-node + xagon-json-rpc: + container_name: xagon-json-rpc + image: xagon-node ports: - 8123:8123 - 8133:8133 # needed if WebSockets enabled - 9091:9091 # needed if metrics enabled environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db + - ZKEVM_NODE_STATEDB_HOST=xagon-state-db + - ZKEVM_NODE_POOL_DB_HOST=xagon-pool-db volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc" + - "/app/xagon-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc" - zkevm-aggregator: - container_name: zkevm-aggregator - image: zkevm-node + xagon-aggregator: + container_name: xagon-aggregator + image: xagon-node ports: - 50081:50081 - 9093:9091 # needed if metrics enabled environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db + - ZKEVM_NODE_STATEDB_HOST=xagon-state-db - ZKEVM_NODE_AGGREGATOR_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 volumes: - ./config/test.node.config.toml:/app/config.toml @@ -112,30 +112,30 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components aggregator" + - "/app/xagon-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components aggregator" - zkevm-sync: - container_name: zkevm-sync - image: zkevm-node + xagon-sync: + container_name: xagon-sync + image: xagon-node ports: - 9095:9091 # needed if metrics enabled environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db + - ZKEVM_NODE_STATEDB_HOST=xagon-state-db volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components synchronizer" + - "/app/xagon-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components synchronizer" - zkevm-eth-tx-manager: - container_name: zkevm-eth-tx-manager - image: zkevm-node + xagon-eth-tx-manager: + container_name: xagon-eth-tx-manager + image: xagon-node ports: - 9094:9091 # needed if metrics enabled environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db + - ZKEVM_NODE_STATEDB_HOST=xagon-state-db volumes: - ./sequencer.keystore:/pk/sequencer.keystore - ./aggregator.keystore:/pk/aggregator.keystore @@ -144,13 +144,13 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components eth-tx-manager" + - "/app/xagon-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components eth-tx-manager" - zkevm-l2gaspricer: - container_name: zkevm-l2gaspricer - image: zkevm-node + xagon-l2gaspricer: + container_name: xagon-l2gaspricer + image: xagon-node environment: - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db + - ZKEVM_NODE_POOL_DB_HOST=xagon-pool-db volumes: - ./test.keystore:/pk/keystore - ./config/test.node.config.toml:/app/config.toml @@ -158,10 +158,10 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components l2gaspricer" + - "/app/xagon-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components l2gaspricer" - zkevm-state-db: - container_name: zkevm-state-db + xagon-state-db: + container_name: xagon-state-db image: postgres:15 deploy: resources: @@ -182,8 +182,8 @@ services: - "-N" - "500" - zkevm-pool-db: - container_name: zkevm-pool-db + xagon-pool-db: + container_name: xagon-pool-db image: postgres:15 deploy: resources: @@ -202,8 +202,8 @@ services: - "-N" - "500" - zkevm-event-db: - container_name: zkevm-event-db + xagon-event-db: + container_name: xagon-event-db image: postgres:15 deploy: resources: @@ -224,9 +224,9 @@ services: - "-N" - "500" - zkevm-explorer-l1: - container_name: zkevm-explorer-l1 - image: hermeznetwork/zkevm-explorer:latest + xagon-explorer-l1: + container_name: xagon-explorer-l1 + image: hermeznetwork/xagon-explorer:latest ports: - 4000:4000 environment: @@ -234,8 +234,8 @@ services: - SUBNETWORK=Local Ethereum - COIN=ETH - ETHEREUM_JSONRPC_VARIANT=geth - - ETHEREUM_JSONRPC_HTTP_URL=http://zkevm-mock-l1-network:8545 - - DATABASE_URL=postgres://l1_explorer_user:l1_explorer_password@zkevm-explorer-l1-db:5432/l1_explorer_db + - ETHEREUM_JSONRPC_HTTP_URL=http://xagon-mock-l1-network:8545 + - DATABASE_URL=postgres://l1_explorer_user:l1_explorer_password@xagon-explorer-l1-db:5432/l1_explorer_db - ECTO_USE_SSL=false - MIX_ENV=prod command: @@ -243,8 +243,8 @@ services: - "-c" - "mix do ecto.create, ecto.migrate; mix phx.server" - zkevm-explorer-l1-db: - container_name: zkevm-explorer-l1-db + xagon-explorer-l1-db: + container_name: xagon-explorer-l1-db image: postgres:15 ports: - 5436:5432 @@ -257,9 +257,9 @@ services: - "-N" - "500" - zkevm-explorer-l2: - container_name: zkevm-explorer-l2 - image: hermeznetwork/zkevm-explorer:latest + xagon-explorer-l2: + container_name: xagon-explorer-l2 + image: hermeznetwork/xagon-explorer:latest ports: - 4001:4000 environment: @@ -267,8 +267,8 @@ services: - SUBNETWORK=Polygon Hermez - COIN=ETH - ETHEREUM_JSONRPC_VARIANT=geth - - ETHEREUM_JSONRPC_HTTP_URL=http://zkevm-explorer-json-rpc:8124 - - DATABASE_URL=postgres://l2_explorer_user:l2_explorer_password@zkevm-explorer-l2-db:5432/l2_explorer_db + - ETHEREUM_JSONRPC_HTTP_URL=http://xagon-explorer-json-rpc:8124 + - DATABASE_URL=postgres://l2_explorer_user:l2_explorer_password@xagon-explorer-l2-db:5432/l2_explorer_db - ECTO_USE_SSL=false - MIX_ENV=prod - LOGO=/images/blockscout_logo.svg @@ -278,15 +278,15 @@ services: - "-c" - "mix do ecto.create, ecto.migrate; mix phx.server" - zkevm-explorer-json-rpc: - container_name: zkevm-explorer-json-rpc - image: zkevm-node + xagon-explorer-json-rpc: + container_name: xagon-explorer-json-rpc + image: xagon-node ports: - 8124:8124 - 8134:8134 # needed if WebSockets enabled environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db + - ZKEVM_NODE_STATEDB_HOST=xagon-state-db + - ZKEVM_NODE_POOL_DB_HOST=xagon-pool-db - ZKEVM_NODE_RPC_PORT=8124 - ZKEVM_NODE_RPC_WEBSOCKETS_PORT=8134 volumes: @@ -295,10 +295,10 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc --http.api eth,net,debug,zkevm,txpool,web3" + - "/app/xagon-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc --http.api eth,net,debug,Xagon,txpool,web3" - zkevm-explorer-l2-db: - container_name: zkevm-explorer-l2-db + xagon-explorer-l2-db: + container_name: xagon-explorer-l2-db image: postgres:15 ports: - 5437:5432 @@ -308,9 +308,9 @@ services: - POSTGRES_DB=l2_explorer_db command: [ "postgres", "-N", "500" ] - zkevm-mock-l1-network: - container_name: zkevm-mock-l1-network - image: hermeznetwork/geth-zkevm-contracts:v2.0.0-RC1-fork.5-geth1.12.0 + xagon-mock-l1-network: + container_name: xagon-mock-l1-network + image: hermeznetwork/geth-xagon-contracts:v2.0.0-RC1-fork.5-geth1.12.0 ports: - 8545:8545 - 8546:8546 @@ -336,9 +336,9 @@ services: - "full" - "--rpc.allow-unprotected-txs" - zkevm-prover: - container_name: zkevm-prover - image: hermeznetwork/zkevm-prover:v2.2.0 + xagon-prover: + container_name: xagon-prover + image: hermeznetwork/xagon-prover:v2.2.0 ports: # - 50051:50051 # Prover - 50052:50052 # Mock prover @@ -360,11 +360,11 @@ services: command: > /app/zkprover-mock server --statedb-port 43061 --executor-port 43071 --test-vector-path /app/testvectors - zkevm-approve: - container_name: zkevm-approve - image: zkevm-node + xagon-approve: + container_name: xagon-approve + image: xagon-node environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db + - ZKEVM_NODE_STATEDB_HOST=xagon-state-db volumes: - ./sequencer.keystore:/pk/keystore - ./config/test.node.config.toml:/app/config.toml @@ -372,10 +372,10 @@ services: command: - "/bin/sh" - "-c" - - "/app/zkevm-node approve --network custom --custom-network-file /app/genesis.json --key-store-path /pk/keystore --pw testonly --am 115792089237316195423570985008687907853269984665640564039457584007913129639935 -y --cfg /app/config.toml" + - "/app/xagon-node approve --network custom --custom-network-file /app/genesis.json --key-store-path /pk/keystore --pw testonly --am 115792089237316195423570985008687907853269984665640564039457584007913129639935 -y --cfg /app/config.toml" - zkevm-permissionless-db: - container_name: zkevm-permissionless-db + xagon-permissionless-db: + container_name: xagon-permissionless-db image: postgres:15 deploy: resources: @@ -396,9 +396,9 @@ services: - "-N" - "500" - zkevm-permissionless-node: - container_name: zkevm-permissionless-node - image: zkevm-node + xagon-permissionless-node: + container_name: xagon-permissionless-node + image: xagon-node ports: - 8125:8125 environment: @@ -406,26 +406,26 @@ services: - ZKEVM_NODE_STATEDB_USER=test_user - ZKEVM_NODE_STATEDB_PASSWORD=test_password - ZKEVM_NODE_STATEDB_NAME=state_db - - ZKEVM_NODE_STATEDB_HOST=zkevm-permissionless-db + - ZKEVM_NODE_STATEDB_HOST=xagon-permissionless-db - ZKEVM_NODE_POOL_DB_USER=test_user - ZKEVM_NODE_POOL_DB_PASSWORD=test_password - ZKEVM_NODE_POOL_DB_NAME=pool_db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-permissionless-db + - ZKEVM_NODE_POOL_DB_HOST=xagon-permissionless-db - ZKEVM_NODE_RPC_PORT=8125 - - ZKEVM_NODE_RPC_SEQUENCERNODEURI=http://zkevm-json-rpc:8123 - - ZKEVM_NODE_MTCLIENT_URI=zkevm-permissionless-prover:50061 - - ZKEVM_NODE_EXECUTOR_URI=zkevm-permissionless-prover:50071 + - ZKEVM_NODE_RPC_SEQUENCERNODEURI=http://xagon-json-rpc:8123 + - ZKEVM_NODE_MTCLIENT_URI=xagon-permissionless-prover:50061 + - ZKEVM_NODE_EXECUTOR_URI=xagon-permissionless-prover:50071 volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"rpc,synchronizer\"" + - "/app/xagon-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"rpc,synchronizer\"" - zkevm-permissionless-prover: - container_name: zkevm-permissionless-prover - image: hermeznetwork/zkevm-prover:v2.2.0 + xagon-permissionless-prover: + container_name: xagon-permissionless-prover + image: hermeznetwork/xagon-prover:v2.2.0 ports: # - 50058:50058 # Prover - 50059:50052 # Mock prover @@ -436,9 +436,9 @@ services: command: > zkProver -c /usr/src/app/config.json - zkevm-metrics: + xagon-metrics: image: prom/prometheus:v2.39.1 - container_name: zkevm-metrics + container_name: xagon-metrics restart: unless-stopped ports: - 9090:9090 @@ -448,14 +448,14 @@ services: volumes: - ../config/metrics/prometheus:/etc/prometheus - zkevm-sh: - container_name: zkevm-sh - image: zkevm-node + xagon-sh: + container_name: xagon-sh + image: xagon-node stdin_open: true tty: true environment: - - ZKEVM_NODE_STATEDB_HOST=zkevm-state-db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db + - ZKEVM_NODE_STATEDB_HOST=xagon-state-db + - ZKEVM_NODE_POOL_DB_HOST=xagon-pool-db volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json diff --git a/test/scripts/postgres/run.sh b/test/scripts/postgres/run.sh index f0dcb1b95e..c2812a5c07 100644 --- a/test/scripts/postgres/run.sh +++ b/test/scripts/postgres/run.sh @@ -17,8 +17,8 @@ main(){ echo "${script_contents}" > "${script_file_path}" - docker cp "${script_file_path}" zkevm-state-db:"${script_file_path}" - docker exec zkevm-state-db bash -c "chmod a+x ${script_file_path} && psql ${DBNAME} ${DBUSER} -v ON_ERROR_STOP=ON --single-transaction -f ${script_file_path}" + docker cp "${script_file_path}" xagon-state-db:"${script_file_path}" + docker exec xagon-state-db bash -c "chmod a+x ${script_file_path} && psql ${DBNAME} ${DBUSER} -v ON_ERROR_STOP=ON --single-transaction -f ${script_file_path}" echo "Done" done diff --git a/tools/executor/README.md b/tools/executor/README.md index 990bf2cd9e..eca453947c 100644 --- a/tools/executor/README.md +++ b/tools/executor/README.md @@ -70,7 +70,7 @@ In case some vector doesn't use the default genesis: ```bash make run-db make run-zkprover -docker-compose up -d zkevm-sync +docker-compose up -d xagon-sync ``` 2. Get the entries of the merkletree in JSON format: `PGPASSWORD=prover_pass psql -h 127.0.0.1 -p 5432 -U prover_user -d prover_db -c "select row_to_json(t) from (select encode(hash, 'hex') as hash, encode(data, 'hex') as data from state.merkletree) t" > newGenesis.json`