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

Web3-indexer in docker setup of testnet_v1 is always dying with error #21

Closed
e00dan opened this issue Mar 23, 2022 · 7 comments · Fixed by #22
Closed

Web3-indexer in docker setup of testnet_v1 is always dying with error #21

e00dan opened this issue Mar 23, 2022 · 7 comments · Fixed by #22
Assignees
Labels
enhancement New feature or request

Comments

@e00dan
Copy link

e00dan commented Mar 23, 2022

web3-indexer seems to always die with errors @Flouse, using Docker config from godwoken-info

web3-indexer_1            | [2022-03-23T11:05:29Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-03-23T11:05:29Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-03-23T11:05:29Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x2", expected struct ErrorTxReceipt
web3-indexer_1            | Error: block #8 error! error sending request for url (http://gw-testnet_v1-readonly:8119/): error trying to connect: tcp connect error: Connection refused (os error 111)
testnet_v1_web3-indexer_1 exited with code 1
ubuntu@:~/godwoken-info/testnet_v1$ docker-compose up -d
testnet_v1_redis_1 is up-to-date
testnet_v1_postgres_1 is up-to-date
gw-testnet_v1-readonly is up-to-date
testnet_v1_web3_1 is up-to-date
Starting testnet_v1_web3-indexer_1 ... done
ubuntu@:~/godwoken-info/testnet_v1$ docker-compose logs -f web3-indexer
Attaching to testnet_v1_web3-indexer_1
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x0", expected struct ErrorTxReceipt
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::runner] Sync block 0
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::runner] Sync block 1
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::runner] Sync block 2
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::runner] Sync block 3
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::runner] Sync block 4
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::runner] Sync block 5
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::runner] Sync block 6
web3-indexer_1            | [2022-03-23T11:03:24Z INFO  gw_web3_indexer::runner] Sync block 7
web3-indexer_1            | Error: Can't get script by script_hash: H256([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
web3-indexer_1            | [2022-03-23T11:04:01Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-03-23T11:04:01Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-03-23T11:04:01Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x1", expected struct ErrorTxReceipt
web3-indexer_1            | Error: Can't get script by script_hash: H256([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
web3-indexer_1            | [2022-03-23T11:04:37Z ERROR gw_web3_indexer::ws_client] websocket disconnected, will retry after 3s: WebSocketError: I/O failure
web3-indexer_1            | Error: block #8 error! error sending request for url (http://gw-testnet_v1-readonly:8119/): error trying to connect: tcp connect error: Connection refused (os error 111)
web3-indexer_1            | [2022-03-23T11:04:50Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-03-23T11:04:50Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-03-23T11:04:50Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x0", expected struct ErrorTxReceipt
web3-indexer_1            | Error: block #8 error! error sending request for url (http://gw-testnet_v1-readonly:8119/): error trying to connect: tcp connect error: Connection refused (os error 111)
web3-indexer_1            | [2022-03-23T11:05:09Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-03-23T11:05:09Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-03-23T11:05:09Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x1", expected struct ErrorTxReceipt
web3-indexer_1            | Error: block #8 error! error sending request for url (http://gw-testnet_v1-readonly:8119/): error trying to connect: tcp connect error: Connection refused (os error 111)
web3-indexer_1            | [2022-03-23T11:05:29Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-03-23T11:05:29Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-03-23T11:05:29Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x2", expected struct ErrorTxReceipt
web3-indexer_1            | Error: block #8 error! error sending request for url (http://gw-testnet_v1-readonly:8119/): error trying to connect: tcp connect error: Connection refused (os error 111)
web3-indexer_1            | [2022-03-23T11:06:20Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-03-23T11:06:20Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-03-23T11:06:20Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x3", expected struct ErrorTxReceipt
web3-indexer_1            | Error: block #8 error! error sending request for url (http://gw-testnet_v1-readonly:8119/): error trying to connect: tcp connect error: Connection refused (os error 111)
testnet_v1_web3-indexer_1 exited with code 1
@Flouse
Copy link
Collaborator

Flouse commented Mar 23, 2022

The error pointed out that the Web3-indexer can't connect to gw-testnet_v1-readonly service.

Would you share your docker-compose.yml file and check the gw-testnet_v1-readonly service?

@Flouse Flouse self-assigned this Mar 23, 2022
@Flouse
Copy link
Collaborator

Flouse commented Mar 23, 2022

Here was the Logs on my machine

image

@e00dan
Copy link
Author

e00dan commented Mar 23, 2022

The error pointed out that the Web3-indexer can't connect to gw-testnet_v1-readonly service.

Would you share your docker-compose.yml file and check the gw-testnet_v1-readonly service?

Using this one: https://github.com/nervosnetwork/godwoken-info/blob/main/testnet_v1/docker-compose.yml

@Flouse
Copy link
Collaborator

Flouse commented Mar 29, 2022

@kuzirashi
Does #22 fix this issue?

@e00dan
Copy link
Author

e00dan commented Apr 1, 2022

@Flouse

It seems better now but is still dies a bit later with error:

web3-indexer_1            | Error: Can't get script by script_hash: H256([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
testnet_v1_web3-indexer_1 exited with code 1"

Full log:

➜  testnet_v1 git:(info) docker-compose logs -f 
Attaching to testnet_v1_web3-indexer_1, testnet_v1_web3_1, testnet_v1_redis_1, gw-testnet_v1-readonly, testnet_v1_postgres_1
postgres_1                | The files belonging to this database system will be owned by user "postgres".
postgres_1                | This user must also own the server process.
postgres_1                | 
postgres_1                | The database cluster will be initialized with locale "en_US.utf8".
postgres_1                | The default database encoding has accordingly been set to "UTF8".
postgres_1                | The default text search configuration will be set to "english".
postgres_1                | 
postgres_1                | Data page checksums are disabled.
postgres_1                | 
postgres_1                | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgres_1                | creating subdirectories ... ok
postgres_1                | selecting dynamic shared memory implementation ... posix
postgres_1                | selecting default max_connections ... 100
postgres_1                | selecting default shared_buffers ... 128MB
postgres_1                | selecting default time zone ... UTC
postgres_1                | creating configuration files ... ok
postgres_1                | running bootstrap script ... ok
postgres_1                | sh: locale: not found
postgres_1                | 2022-04-01 10:37:33.573 UTC [32] WARNING:  no usable system locales were found
postgres_1                | performing post-bootstrap initialization ... ok
postgres_1                | syncing data to disk ... ok
postgres_1                | 
postgres_1                | initdb: warning: enabling "trust" authentication for local connections
postgres_1                | You can change this by editing pg_hba.conf or using the option -A, or
postgres_1                | --auth-local and --auth-host, the next time you run initdb.
postgres_1                | 
postgres_1                | Success. You can now start the database server using:
postgres_1                | 
postgres_1                |     pg_ctl -D /var/lib/postgresql/data -l logfile start
postgres_1                | 
postgres_1                | waiting for server to start....2022-04-01 10:37:47.263 UTC [38] LOG:  starting PostgreSQL 14.2 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027, 64-bit
postgres_1                | 2022-04-01 10:37:47.266 UTC [38] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1                | 2022-04-01 10:37:47.291 UTC [39] LOG:  database system was shut down at 2022-04-01 10:37:44 UTC
postgres_1                | 2022-04-01 10:37:47.327 UTC [38] LOG:  database system is ready to accept connections
postgres_1                |  done
postgres_1                | server started
postgres_1                | CREATE DATABASE
postgres_1                | 
postgres_1                | 
postgres_1                | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/web3-indexer-schema.sql
postgres_1                | CREATE TABLE
postgres_1                | CREATE TABLE
postgres_1                | CREATE INDEX
postgres_1                | CREATE INDEX
postgres_1                | CREATE INDEX
postgres_1                | CREATE INDEX
postgres_1                | CREATE INDEX
postgres_1                | CREATE INDEX
postgres_1                | CREATE INDEX
postgres_1                | CREATE TABLE
postgres_1                | CREATE INDEX
postgres_1                | CREATE INDEX
postgres_1                | CREATE INDEX
postgres_1                | CREATE INDEX
postgres_1                | CREATE TABLE
postgres_1                | CREATE INDEX
postgres_1                | CREATE INDEX
postgres_1                | 
postgres_1                | 
postgres_1                | waiting for server to shut down...2022-04-01 10:37:51.295 UTC [38] LOG:  received fast shutdown request
postgres_1                | .2022-04-01 10:37:51.298 UTC [38] LOG:  aborting any active transactions
postgres_1                | 2022-04-01 10:37:51.300 UTC [38] LOG:  background worker "logical replication launcher" (PID 45) exited with exit code 1
postgres_1                | 2022-04-01 10:37:51.300 UTC [40] LOG:  shutting down
postgres_1                | 2022-04-01 10:37:51.543 UTC [38] LOG:  database system is shut down
postgres_1                |  done
postgres_1                | server stopped
postgres_1                | 
postgres_1                | PostgreSQL init process complete; ready for start up.
postgres_1                | 
postgres_1                | 2022-04-01 10:37:51.646 UTC [1] LOG:  starting PostgreSQL 14.2 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027, 64-bit
postgres_1                | 2022-04-01 10:37:51.646 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres_1                | 2022-04-01 10:37:51.646 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres_1                | 2022-04-01 10:37:51.652 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1                | 2022-04-01 10:37:51.686 UTC [54] LOG:  database system was shut down at 2022-04-01 10:37:51 UTC
postgres_1                | 2022-04-01 10:37:51.722 UTC [1] LOG:  database system is ready to accept connections
redis_1                   | 1:C 01 Apr 2022 10:37:23.804 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1                   | 1:C 01 Apr 2022 10:37:23.804 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1                   | 1:C 01 Apr 2022 10:37:23.804 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1                   | 1:M 01 Apr 2022 10:37:23.805 * monotonic clock: POSIX clock_gettime
redis_1                   | 1:M 01 Apr 2022 10:37:23.806 * Running mode=standalone, port=6379.
redis_1                   | 1:M 01 Apr 2022 10:37:23.806 # Server initialized
redis_1                   | 1:M 01 Apr 2022 10:37:23.811 * Ready to accept connections
web3-indexer_1            | [2022-04-01T10:38:01Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-04-01T10:38:01Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-04-01T10:38:01Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x0", expected struct ErrorTxReceipt
web3-indexer_1            | [2022-04-01T10:38:02Z INFO  gw_web3_indexer::runner] Sync block 0
gw-testnet_v1-readonly    | [2022-04-01T10:37:24Z INFO  gw_block_producer::runner] Runtime threads: 8. (set environment 'SMOL_THREADS' to tune this value)
gw-testnet_v1-readonly    | [2022-04-01T10:37:41Z INFO  gw_db::migrate] Init db version: 20211229181750
gw-testnet_v1-readonly    | [2022-04-01T10:37:43Z INFO  gw_generator::backend_manage] Compile AotCode with VMVersion::V0
gw-testnet_v1-readonly    | [2022-04-01T10:37:43Z INFO  gw_generator::backend_manage] Compile AotCode with VMVersion::V1
gw-testnet_v1-readonly    | [2022-04-01T10:37:43Z INFO  gw_generator::backend_manage] Compile AotCode with VMVersion::V0
gw-testnet_v1-readonly    | [2022-04-01T10:37:43Z INFO  gw_generator::backend_manage] Compile AotCode with VMVersion::V1
gw-testnet_v1-readonly    | [2022-04-01T10:37:43Z INFO  gw_generator::backend_manage] Compile AotCode with VMVersion::V0
gw-testnet_v1-readonly    | [2022-04-01T10:37:43Z INFO  gw_generator::backend_manage] Compile AotCode with VMVersion::V1
gw-testnet_v1-readonly    | [2022-04-01T10:37:44Z INFO  gw_generator::backend_manage] Compile AotCode with VMVersion::V0
gw-testnet_v1-readonly    | [2022-04-01T10:37:44Z INFO  gw_generator::backend_manage] Compile AotCode with VMVersion::V1
gw-testnet_v1-readonly    | [2022-04-01T10:37:56Z INFO  gw_mem_pool::pool] [mem-pool] reset reinject txs: 0 mem-block txs: 0 reinject withdrawals: 0 mem-block withdrawals: 0
gw-testnet_v1-readonly    | [2022-04-01T10:37:56Z INFO  gw_block_producer::runner] Check state db done: 2ms
gw-testnet_v1-readonly    | [2022-04-01T10:37:56Z INFO  gw_rpc_server::registry] reinject mem block txs 0
gw-testnet_v1-readonly    | [2022-04-01T10:37:56Z INFO  gw_block_producer::runner] Rollup type script hash: 4940246f168f4106429dc641add3381a44b5eef61e7754142f594e986671a575
gw-testnet_v1-readonly    | [2022-04-01T10:37:56Z INFO  gw_block_producer::runner] Rollup config hash: bb7e7f688e3d432a40dc9afbd5db3f55d8737138862df1b389187328a9c1f5e2
gw-testnet_v1-readonly    | [2022-04-01T10:37:56Z INFO  gw_block_producer::runner] ReadOnly mode
gw-testnet_v1-readonly    | [2022-04-01T10:37:56Z INFO  gw_rpc_server::server] JSONRPC server listening on http://0.0.0.0:8119
gw-testnet_v1-readonly    | [2022-04-01T10:37:56Z INFO  parity_ws] Listening for new connections on 0.0.0.0:8219.
gw-testnet_v1-readonly    | [2022-04-01T10:37:56Z INFO  gw_rpc_ws_server::server] Listen WS RPCServer on address 0.0.0.0:8219
gw-testnet_v1-readonly    | [2022-04-01T10:38:01Z INFO  gw_block_producer::runner] received new layer1 block 4896957, bf2222a2598a2d3cec07c47c40dc1f4c03c7eedd0322f95c6dfb20506024e51a
gw-testnet_v1-readonly    | [2022-04-01T10:38:01Z INFO  parity_ws::io] Accepted a new tcp connection from 172.18.0.6:37124.
gw-testnet_v1-readonly    | [2022-04-01T10:38:01Z INFO  gw_mem_pool::pool] [mem-pool] reset reinject txs: 0 mem-block txs: 0 reinject withdrawals: 0 mem-block withdrawals: 0
gw-testnet_v1-readonly    | [2022-04-01T10:38:03Z INFO  gw_chain::chain] sync new block #1 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:03Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip db9d6c9dff461c5a3b5426fb86c51cbd0f7463e2ec73bc08e2457c0cdb3d85b6
gw-testnet_v1-readonly    | [2022-04-01T10:38:04Z INFO  gw_chain::chain] sync new block #2 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:04Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip b4d7fd3950bed5ffea152dcf601568c48407ab02c412a75eeb551e42ba093aad
web3_1                    | + yarn run build
web3_1                    | yarn run v1.22.17
web3_1                    | $ yarn workspaces run build
web3_1                    | 
web3_1                    | > @godwoken-web3/godwoken
web3_1                    | $ tsc
web3_1                    | 
web3_1                    | > @godwoken-web3/api-server
web3_1                    | $ tsc
web3-indexer_1            | [2022-04-01T10:38:05Z INFO  gw_web3_indexer::runner] Sync block 1
web3-indexer_1            | [2022-04-01T10:38:05Z INFO  gw_web3_indexer::runner] Sync block 2
gw-testnet_v1-readonly    | [2022-04-01T10:38:05Z INFO  gw_chain::chain] sync new block #3 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:05Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip 5404f9fcabf0fe679607db3adede9840af422a7917056be858b787c18db24858
gw-testnet_v1-readonly    | [2022-04-01T10:38:05Z INFO  gw_chain::chain] sync new block #4 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:05Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip 2e4e6c294d2467af3ca02019ef4258b9ea9e3426d6acdb2d8782c4f135eb7488
gw-testnet_v1-readonly    | [2022-04-01T10:38:06Z INFO  gw_chain::chain] sync new block #5 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:06Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip 91de2b31105ad40853b2b04f3d0af4b04c23adbff72ce1905a5fd7acf2a419b2
gw-testnet_v1-readonly    | [2022-04-01T10:38:07Z INFO  gw_chain::chain] sync new block #6 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:07Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip d4c328bf4225c4f89e4db475ca8780579b0818dd92e5c82052f3db5ceea6c4c3
gw-testnet_v1-readonly    | [2022-04-01T10:38:07Z INFO  gw_chain::chain] sync new block #7 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:08Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip 26a1197773e2ec88f37d3755e93e9c8c770a16a066cd441733c3dc4b3532364a
web3-indexer_1            | [2022-04-01T10:38:08Z INFO  gw_web3_indexer::runner] Sync block 3
web3-indexer_1            | [2022-04-01T10:38:08Z INFO  gw_web3_indexer::runner] Sync block 4
web3-indexer_1            | [2022-04-01T10:38:08Z INFO  gw_web3_indexer::runner] Sync block 5
web3-indexer_1            | [2022-04-01T10:38:08Z INFO  gw_web3_indexer::runner] Sync block 6
web3-indexer_1            | [2022-04-01T10:38:08Z INFO  gw_web3_indexer::runner] Sync block 7
gw-testnet_v1-readonly    | [2022-04-01T10:38:08Z INFO  gw_chain::chain] sync new block #8 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:09Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip 670caf14fb9a8af8fea2bba0ae2e1753bd4216081425682edf664e9887c13df8
gw-testnet_v1-readonly    | [2022-04-01T10:38:09Z INFO  gw_chain::chain] sync new block #9 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:09Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip d79d75e21356b20a4d93e709e1e12049f6eb6f2c2600ffce4d64781425aa6180
gw-testnet_v1-readonly    | [2022-04-01T10:38:10Z INFO  gw_chain::chain] sync new block #10 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:10Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip 4d6e31591167f5e0118833e6bf7f8793df09b878f686a297d2a9991372592496
gw-testnet_v1-readonly    | [2022-04-01T10:38:11Z INFO  gw_chain::chain] sync new block #11 success
gw-testnet_v1-readonly    | [2022-04-01T10:38:11Z INFO  gw_block_producer::poller] [sync revert] known last tx hash, skip 930009448dd0ea3fb976f0423d42b215fdeef781d08480acc48005b67f971d24
web3-indexer_1            | Error: Can't get script by script_hash: H256([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
testnet_v1_web3-indexer_1 exited with code 1

Trying to restart only web3-indexer to see if it works also results in web3-indexer exiting:

➜  testnet_v1 git:(info) docker-compose up -d   
testnet_v1_postgres_1 is up-to-date
gw-testnet_v1-readonly is up-to-date
testnet_v1_redis_1 is up-to-date
testnet_v1_web3_1 is up-to-date
Starting testnet_v1_web3-indexer_1 ... done
➜  testnet_v1 git:(info) docker-compose up -d
gw-testnet_v1-readonly is up-to-date
testnet_v1_redis_1 is up-to-date
testnet_v1_postgres_1 is up-to-date
testnet_v1_web3_1 is up-to-date
Starting testnet_v1_web3-indexer_1 ... done
➜  testnet_v1 git:(info) docker-compose up -d
gw-testnet_v1-readonly is up-to-date
testnet_v1_redis_1 is up-to-date
testnet_v1_postgres_1 is up-to-date
testnet_v1_web3_1 is up-to-date
Starting testnet_v1_web3-indexer_1 ... done
➜  testnet_v1 git:(info) docker-compose logs web3-indexer -f
ERROR: No such service: -f
➜  testnet_v1 git:(info) docker-compose logs -f web3-indexer
Attaching to testnet_v1_web3-indexer_1
web3-indexer_1            | [2022-04-01T10:38:01Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-04-01T10:38:01Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-04-01T10:38:01Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x0", expected struct ErrorTxReceipt
web3-indexer_1            | [2022-04-01T10:38:02Z INFO  gw_web3_indexer::runner] Sync block 0
web3-indexer_1            | [2022-04-01T10:38:05Z INFO  gw_web3_indexer::runner] Sync block 1
web3-indexer_1            | [2022-04-01T10:38:05Z INFO  gw_web3_indexer::runner] Sync block 2
web3-indexer_1            | [2022-04-01T10:38:08Z INFO  gw_web3_indexer::runner] Sync block 3
web3-indexer_1            | [2022-04-01T10:38:08Z INFO  gw_web3_indexer::runner] Sync block 4
web3-indexer_1            | [2022-04-01T10:38:08Z INFO  gw_web3_indexer::runner] Sync block 5
web3-indexer_1            | [2022-04-01T10:38:08Z INFO  gw_web3_indexer::runner] Sync block 6
web3-indexer_1            | [2022-04-01T10:38:08Z INFO  gw_web3_indexer::runner] Sync block 7
web3-indexer_1            | Error: Can't get script by script_hash: H256([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
web3-indexer_1            | [2022-04-01T10:41:44Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-04-01T10:41:44Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-04-01T10:41:44Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x1", expected struct ErrorTxReceipt
web3-indexer_1            | Error: Can't get script by script_hash: H256([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
web3-indexer_1            | [2022-04-01T10:42:04Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-04-01T10:42:04Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-04-01T10:42:04Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x2", expected struct ErrorTxReceipt
web3-indexer_1            | Error: Can't get script by script_hash: H256([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
web3-indexer_1            | [2022-04-01T10:42:05Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-04-01T10:42:05Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-04-01T10:42:05Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x3", expected struct ErrorTxReceipt
web3-indexer_1            | Error: Can't get script by script_hash: H256([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
web3-indexer_1            | [2022-04-01T10:42:07Z INFO  gw_web3_indexer::ws_client] Successfully connected
web3-indexer_1            | [2022-04-01T10:42:07Z INFO  gw_web3_indexer::ws_client] Message send ok
web3-indexer_1            | [2022-04-01T10:42:07Z INFO  gw_web3_indexer::ws_client] ErrorTxReceipt type mismatch: invalid type: string "0x4", expected struct ErrorTxReceipt
web3-indexer_1            | Error: Can't get script by script_hash: H256([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
testnet_v1_web3-indexer_1 exited with code 1

@Flouse Flouse added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Apr 1, 2022
@Flouse
Copy link
Collaborator

Flouse commented Apr 4, 2022

The web3-indexer should start after the godwoken-readonly-node synced to Tip Block.
We use gw_get_mem_pool_state_ready RPC to Query whether a Godwoken readonly node is ready to serve.


I have added a GitHub action workflow called Sync Test to test godwoken readonly node syncing.

image

Tested in https://github.com/nervosnetwork/godwoken-info/runs/5809986803?check_suite_focus=true#step:11:212

@e00dan
Copy link
Author

e00dan commented Apr 7, 2022

Seems fixed. 👏

image

@e00dan e00dan closed this as completed Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants