diff --git a/testnet_v1_1/README.md b/testnet_v1_1/README.md index f840c8c..2d56c4e 100644 --- a/testnet_v1_1/README.md +++ b/testnet_v1_1/README.md @@ -21,7 +21,7 @@ docker-compose up -d * RPC URL: https://godwoken-testnet-v1.ckbapp.dev * Websocket RPC URL: wss://godwoken-testnet-v1.ckbapp.dev/ws -* Bridge: https://testnet.bridge.godwoken.io +* Godwoken Token Bridge: https://testnet.bridge.godwoken.io * Polyjuice Creator ID: 4 ```js diff --git a/testnet_v1_1/docker-compose.yml b/testnet_v1_1/docker-compose.yml index 8a93526..d84dacf 100644 --- a/testnet_v1_1/docker-compose.yml +++ b/testnet_v1_1/docker-compose.yml @@ -4,7 +4,7 @@ version: '3.9' services: gw-readonly: container_name: gw-testnet_v1.1-readonly - image: ghcr.io/nervosnetwork/godwoken-prebuilds:v1.1 + image: ghcr.io/nervosnetwork/godwoken-prebuilds:v1.1.3-beta-202205231016 healthcheck: test: /healthcheck.sh start_period: 10s @@ -22,19 +22,18 @@ services: - RUST_LOG=info command: godwoken expose: - - "8119" - - "8219" + - 8119 + - 8219 postgres: image: postgres:alpine expose: - - "5432" + - 5432 environment: POSTGRES_USER: user POSTGRES_DB: lumos POSTGRES_PASSWORD: password volumes: - - ./web3-indexer-schema.sql:/docker-entrypoint-initdb.d/web3-indexer-schema.sql - ./chain-data/postgresql/data:/var/lib/postgresql/data redis: @@ -44,31 +43,31 @@ services: - ./chain-data/redis-data:/data web3: - image: ghcr.io/nervosnetwork/godwoken-web3-prebuilds:compatibility-breaking-changes-2b1dc8e + image: ghcr.io/nervosnetwork/godwoken-web3-prebuilds:refactor-db-01b5da5 healthcheck: - test: curl http://127.0.0.1:3000 || exit 1 + test: curl http://127.0.0.1:8024 || exit 1 volumes: - ./web3.env:/godwoken-web3/packages/api-server/.env working_dir: /godwoken-web3 - command: bash -c 'set -ex ; yarn run build && yarn run start:prod' + command: bash -c 'set -ex ; yarn knex migrate:latest && yarn start:prod' ports: - - '8024:3000' - depends_on: + - 8024 + depends_on: - redis - postgres - gw-readonly web3-indexer: - image: ghcr.io/nervosnetwork/godwoken-web3-indexer-prebuilds:compatibility-breaking-changes-b97b1a5 - volumes: + image: ghcr.io/nervosnetwork/godwoken-web3-indexer-prebuilds:refactor-db-01b5da5 + volumes: - ./web3-indexer-config.toml:/var/lib/web3-indexer/indexer-config.toml working_dir: /var/lib/web3-indexer command: [ "gw-web3-indexer" ] environment: - RUST_LOG=info - depends_on: + depends_on: web3: - condition: service_started + condition: service_healthy gw-readonly: condition: service_healthy postgres: diff --git a/testnet_v1_1/gw-testnet_v1.1-config-readonly.toml b/testnet_v1_1/gw-testnet_v1.1-config-readonly.toml index c6ac649..295ddb1 100644 --- a/testnet_v1_1/gw-testnet_v1.1-config-readonly.toml +++ b/testnet_v1_1/gw-testnet_v1.1-config-readonly.toml @@ -11,6 +11,10 @@ node_mode = 'readonly' ckb_url = 'http://3.83.107.217:8114' indexer_url = 'http://3.83.107.217:8116' +# Local Nodes +# indexer_url = 'http://172.17.0.1:18116' +# ckb_url = 'http://172.17.0.1:38114' + [rpc_server] listen = '0.0.0.0:8119' enable_methods = [] @@ -143,7 +147,7 @@ execute_l2tx_max_cycles = 100000000 restore_path = '/mnt/mem-pool/mem-block' [store] -path = '/mnt/store20220508.db' +path = '/mnt/store20220523.db' options_file = '/deploy/db.toml' cache_size = 536870912 [store.options] diff --git a/testnet_v1_1/web3-indexer-schema.sql b/testnet_v1_1/web3-indexer-schema.sql deleted file mode 100644 index c994805..0000000 --- a/testnet_v1_1/web3-indexer-schema.sql +++ /dev/null @@ -1,81 +0,0 @@ - --- Add migration script here -CREATE TABLE blocks ( - number NUMERIC PRIMARY KEY, - hash TEXT UNIQUE NOT NULL, - parent_hash TEXT NOT NULL, - logs_bloom TEXT NOT NULL, - gas_limit NUMERIC NOT NULL, - gas_used NUMERIC NOT NULL, - timestamp TIMESTAMPTZ NOT NULL, - miner TEXT NOT NULL, - size NUMERIC NOT NULL -); - - --- Add migration script here -CREATE TABLE transactions ( - id BIGSERIAL PRIMARY KEY, - hash TEXT UNIQUE NOT NULL, - eth_tx_hash TEXT UNIQUE NOT NULL, - block_number NUMERIC REFERENCES blocks(number) NOT NULL, - block_hash TEXT NOT NULL, - transaction_index INTEGER NOT NULL, - from_address TEXT NOT NULL, - to_address TEXT, - value NUMERIC NOT NULL, - nonce NUMERIC, - gas_limit NUMERIC, - gas_price NUMERIC, - input TEXT, - v NUMERIC NOT NULL, - r TEXT NOT NULL, - s TEXT NOT NULL, - cumulative_gas_used NUMERIC, - gas_used NUMERIC, - logs_bloom TEXT NOT NULL, - contract_address TEXT, - status BOOLEAN NOT NULL -); - -CREATE INDEX ON transactions (block_number); -CREATE INDEX ON transactions (block_hash); -CREATE INDEX ON transactions (from_address); -CREATE INDEX ON transactions (to_address); -CREATE INDEX ON transactions (contract_address); -CREATE UNIQUE INDEX block_number_transaction_index_idx ON transactions (block_number, transaction_index); -CREATE UNIQUE INDEX block_hash_transaction_index_idx ON transactions (block_hash, transaction_index); - - --- Add migration script here -CREATE TABLE logs ( - id BIGSERIAL PRIMARY KEY, - transaction_id BIGSERIAL REFERENCES transactions(id) NOT NULL, - transaction_hash TEXT NOT NULL, - transaction_index INTEGER NOT NULL, - block_number NUMERIC REFERENCES blocks(number) NOT NULL, - block_hash TEXT NOT NULL, - address TEXT NOT NULL, - data TEXT NOT NULL, - log_index INTEGER NOT NULL, - topics TEXT[] NOT NULL -); - -CREATE INDEX ON logs (transaction_hash); -CREATE INDEX ON logs (block_hash); -CREATE INDEX ON logs (address); -CREATE INDEX ON logs (block_number); - --- Add migration script here -CREATE TABLE error_transactions ( - id BIGSERIAL PRIMARY KEY, - hash TEXT UNIQUE NOT NULL, - block_number NUMERIC NOT NULL, - cumulative_gas_used NUMERIC, - gas_used NUMERIC, - status_code NUMERIC NOT NULL, - status_reason bytea NOT NULL -); - -CREATE INDEX ON error_transactions (block_number); -CREATE INDEX ON error_transactions (hash);