Closed 2019jack closed 1 year ago
Hi @2019jack, the error is due not using the BSC RPC address. BTW, please use https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443
for Greenfield RPC address, the port need to be specified.
https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443
error:
panic: new rpc client error
goroutine 1 [running]:
github.com/bnb-chain/greenfield-relayer/executor.newBSCClients(0xc000f7b800)
/opt/app/executor/bsc_executor.go:50 +0x49e
github.com/bnb-chain/greenfield-relayer/executor.NewBSCExecutor(0xc000f7b800, 0xc000fe5ff0)
/opt/app/executor/bsc_executor.go:146 +0x1c5
github.com/bnb-chain/greenfield-relayer/app.NewApp(0xc000f7b800)
/opt/app/app/app.go:87 +0x7da
main.main()
/opt/app/main.go:82 +0x1fc
can you share correct example config.json?
https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443
logs:
2023-09-22 09:33:04 INFO getBlockAndBlockResult retrieved greenfield block at height=1
2023-09-22 09:33:04 ERROR poll encounter error when monitoring block at Height=1, err=no contract code at given address
2023-09-22 09:33:04 ERROR func2 failed to query latest height, attempt: 5 times, max_attempts: 5
2023-09-22 09:33:04 ERROR poll failed to get latest blockHeight, error: the method eth_getFinalizedHeader does not exist/is not available
2023-09-22 09:33:04 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:05 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:05 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:05 ERROR func2 failed to query latest height, attempt: 1 times, max_attempts: 5
2023-09-22 09:33:06 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:06 ERROR func2 failed to query latest height, attempt: 2 times, max_attempts: 5
2023-09-22 09:33:06 INFO getBlockAndBlockResult retrieved greenfield block at height=1
2023-09-22 09:33:06 ERROR poll encounter error when monitoring block at Height=1, err=no contract code at given address
2023-09-22 09:33:06 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:07 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:07 ERROR func2 failed to query latest height, attempt: 3 times, max_attempts: 5
2023-09-22 09:33:07 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:08 INFO UpdateClientLoop start to monitor bsc data-seeds healthy
2023-09-22 09:33:08 ERROR UpdateClientLoop data seed https://data-seed-prebsc-1-s1.bnbchain.org:8545 is not accessable
2023-09-22 09:33:08 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:08 ERROR UpdateClientLoop get latest block height error, err=the method eth_getFinalizedHeader does not exist/is not available
2023-09-22 09:33:08 INFO getBlockAndBlockResult retrieved greenfield block at height=1
2023-09-22 09:33:08 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:08 ERROR poll encounter error when monitoring block at Height=1, err=no contract code at given address
2023-09-22 09:33:09 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:09 ERROR func2 failed to query latest height, attempt: 4 times, max_attempts: 5
2023-09-22 09:33:09 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:10 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:10 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:10 INFO getBlockAndBlockResult retrieved greenfield block at height=1
2023-09-22 09:33:10 ERROR func2 failed to query send oracle sequence, attempt: 1 times, max_attempts: 5
2023-09-22 09:33:11 ERROR poll encounter error when monitoring block at Height=1, err=no contract code at given address
2023-09-22 09:33:11 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:11 ERROR func2 failed to query send oracle sequence, attempt: 2 times, max_attempts: 5
2023-09-22 09:33:11 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:12 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:12 ERROR AssembleTransactionsLoop encounter error when retrieving in-turn relayer from chain, err=no contract code at given address
2023-09-22 09:33:12 ERROR func2 failed to query send oracle sequence, attempt: 3 times, max_attempts: 5
2023-09-22 09:33:13 INFO getBlockAndBlockResult retrieved greenfield block at height=1
have ready running, normal?
The tutorials lists two contracts need to be adjusted, You can find the updated contract addresses by clicking into the page
.
The tutorials lists two contracts need to be adjusted, You can find the updated contract addresses by clicking into the
page
.
page not cross_chain_package_event_hex
screenshot cross_chain_package_event_hex
correct?
@alexgao001 can you check? https://github.com/bnb-chain/greenfield-challenger/issues/84
The tutorials lists two contracts need to be adjusted, You can find the updated contract addresses by clicking into the
page
.
logs:
2023-09-22 13:13:36 INFO getBlockAndBlockResult retrieved greenfield block at height=177
2023-09-22 13:13:37 INFO getBlockAndBlockResult retrieved greenfield block at height=178
2023-09-22 13:13:38 DEBUG process channel 1 start seq and end enq are 556 and 0
2023-09-22 13:13:38 DEBUG process channel 2 start seq and end enq are 0 and 0
2023-09-22 13:13:38 DEBUG process channel 3 start seq and end enq are 0 and 0
2023-09-22 13:13:38 DEBUG process channel 6 start seq and end enq are 198 and 0
2023-09-22 13:13:38 DEBUG process channel 4 start seq and end enq are 1 and 0
2023-09-22 13:13:38 DEBUG process channel 5 start seq and end enq are 0 and 0
2023-09-22 13:13:38 INFO getBlockAndBlockResult retrieved greenfield block at height=179
2023-09-22 13:13:39 ERROR func2 failed to query latest height, attempt: 5 times, max_attempts: 5
2023-09-22 13:13:39 ERROR poll failed to get latest blockHeight, error: the method eth_getFinalizedHeader does not exist/is not available
2023-09-22 13:13:39 DEBUG process start seq and end enq are 0 and 1199
2023-09-22 13:13:40 INFO getBlockAndBlockResult retrieved greenfield block at height=180
It seems that the relayer is running normally
It seems you are getting error when querying the BSC RPC endpoint, can I know what endpoint is used?
It seems you are getting error when querying the BSC RPC endpoint, can I know what endpoint is used?
2023-09-25 02:57:07 INFO getBlockAndBlockResult retrieved greenfield block at height=179307
2023-09-25 02:57:07 ERROR func2 failed to query latest height, attempt: 2 times, max_attempts: 5
2023-09-25 02:57:08 DEBUG process start seq and end enq are 0 and 1199
2023-09-25 02:57:08 ERROR func2 failed to query latest height, attempt: 3 times, max_attempts: 5
2023-09-25 02:57:08 INFO getBlockAndBlockResult retrieved greenfield block at height=179308
2023-09-25 02:57:09 INFO getBlockAndBlockResult retrieved greenfield block at height=179309
2023-09-25 02:57:10 ERROR func2 failed to query latest height, attempt: 4 times, max_attempts: 5
2023-09-25 02:57:11 INFO getBlockAndBlockResult retrieved greenfield block at height=179310
2023-09-25 02:57:12 INFO getBlockAndBlockResult retrieved greenfield block at height=179311
2023-09-25 02:57:13 INFO getBlockAndBlockResult retrieved greenfield block at height=179312
2023-09-25 02:57:14 INFO UpdateClientLoop start to monitor bsc data-seeds healthy
2023-09-25 02:57:14 ERROR UpdateClientLoop data seed https://data-seed-prebsc-1-s1.bnbchain.org:8545 is not accessable
2023-09-25 02:57:14 INFO getBlockAndBlockResult retrieved greenfield block at height=179313
2023-09-25 02:57:14 ERROR func2 failed to query latest height, attempt: 5 times, max_attempts: 5
2023-09-25 02:57:14 ERROR poll failed to get latest blockHeight, error: the method eth_getFinalizedHeader does not exist/is not available
2023-09-25 02:57:15 ERROR UpdateClientLoop get latest block height error, err=the method eth_getFinalizedHeader does not exist/is not available
2023-09-25 02:57:15 ERROR func2 failed to query latest height, attempt: 1 times, max_attempts: 5
2023-09-25 02:57:16 INFO getBlockAndBlockResult retrieved greenfield block at height=179314
@alexgao001 check that the relayer is running normally and is synchronizing the latest block of greenfield, right?
@2019jack, Looks it's synchronizing the Greenfield block, but the BSC endpoint is not correct, refer to (https://docs.bscscan.com/misc-tools-and-utilities/public-rpc-nodes) for BSC testnet RPC, you might want to config multiple endpoints as options so that relayer can switch between them.
@2019jack, Looks it's synchronizing the Greenfield block, but the BSC endpoint is not correct, refer to (https://docs.bscscan.com/misc-tools-and-utilities/public-rpc-nodes) for BSC testnet RPC, you might want to config multiple endpoints as options so that relayer can switch between them.
2023-09-25 04:03:28 INFO getBlockAndBlockResult retrieved greenfield block at height=81
2023-09-25 04:03:29 INFO monitorCrossChainPkgAt retrieved BSC block header at height=0
2023-09-25 04:03:29 ERROR poll encounter error when monitor cross-chain packages at blockHeight=0, err=failed to get logs from block at height=0, err=limit exceeded
2023-09-25 04:03:29 INFO getBlockAndBlockResult retrieved greenfield block at height=82
2023-09-25 04:03:30 INFO monitorCrossChainPkgAt retrieved BSC block header at height=0
2023-09-25 04:03:30 ERROR poll encounter error when monitor cross-chain packages at blockHeight=0, err=failed to get logs from block at height=0, err=limit exceeded
2023-09-25 04:03:30 INFO getBlockAndBlockResult retrieved greenfield block at height=83
2023-09-25 04:03:31 INFO monitorCrossChainPkgAt retrieved BSC block header at height=0
2023-09-25 04:03:31 ERROR poll encounter error when monitor cross-chain packages at blockHeight=0, err=failed to get logs from block at height=0, err=limit exceeded
2023-09-25 04:03:31 INFO getBlockAndBlockResult retrieved greenfield block at height=84
2023-09-25 04:03:32 INFO monitorCrossChainPkgAt retrieved BSC block header at height=0
2023-09-25 04:03:32 ERROR poll encounter error when monitor cross-chain packages at blockHeight=0, err=failed to get logs from block at height=0, err=limit exceeded
2023-09-25 04:03:32 DEBUG process start seq and end enq are 0 and 1199
2023-09-25 04:03:33 INFO getBlockAndBlockResult retrieved greenfield block at height=85
2023-09-25 04:03:33 INFO monitorCrossChainPkgAt retrieved BSC block header at height=0
2023-09-25 04:03:33 ERROR poll encounter error when monitor cross-chain packages at blockHeight=0, err=failed to get logs from block at height=0, err=limit exceeded
2023-09-25 04:03:34 INFO getBlockAndBlockResult retrieved greenfield block at height=86
There are 6 BSC rpc configured
@2019jack, seems exceeding the BSC RPC endpoint limit, can you try register and use a endpoint from meganode?
@2019jack, seems exceeding the BSC RPC endpoint limit, can you try register and use a endpoint from meganode?
cool! done
logs:
2023-09-26 06:34:01 INFO monitorCrossChainPkgAt retrieved BSC block header at height=122
2023-09-26 06:34:01 ERROR poll encounter error when monitor cross-chain packages at blockHeight=123, err=429 Too Many Requests: {"jsonrpc":"2.0","id":null,"error":{"code":-32005,"message":"You have reached the maximum CUPS limit. If you need higher throughput, please refer to our Pricing page (https://nodereal.io/pricing) for an upgrade."}}
2023-09-26 06:34:01 INFO getBlockAndBlockResult retrieved greenfield block at height=24
2023-09-26 06:34:01 ERROR poll encounter error when monitoring block at Height=24, err=429 Too Many Requests: {"jsonrpc":"2.0","id":null,"error":{"code":-32005,"message":"You have reached the maximum CUPS limit. If you need higher throughput, please refer to our Pricing page (https://nodereal.io/pricing) for an upgrade."}}
2023-09-26 06:34:02 INFO monitorCrossChainPkgAt retrieved BSC block header at height=123
2023-09-26 06:34:03 INFO monitorCrossChainPkgAt retrieved BSC block header at height=124
@alexgao001 By the way, every time the relayer is restarted, does it synchronize the BSC data from the beginning? Can't it use the data that has already been synchronized?
@2019jack It will resume from where by checking the latest block stored in DB. OR you can start from a new height by change the config start_height
@2019jack It will resume from where by checking the latest block stored in DB. OR you can start from a new height by change the config
start_height
2023-09-26 08:48:17 INFO getBlockAndBlockResult retrieved greenfield block at height=814643
2023-09-26 08:48:19 INFO getBlockAndBlockResult retrieved greenfield block at height=814644
2023-09-26 08:48:20 INFO monitorCrossChainPkgAt retrieved BSC block header at height=33673724
2023-09-26 08:48:21 INFO getBlockAndBlockResult retrieved greenfield block at height=814645
2023-09-26 08:48:22 INFO monitorCrossChainPkgAt retrieved BSC block header at height=33673725
2023-09-26 08:48:23 DEBUG process channel 5 start seq and end enq are 0 and 0
2023-09-26 08:48:23 DEBUG process channel 2 start seq and end enq are 0 and 0
2023-09-26 08:48:23 DEBUG process channel 1 start seq and end enq are 556 and 0
2023-09-26 08:48:23 DEBUG process channel 6 start seq and end enq are 198 and 0
2023-09-26 08:48:23 DEBUG process channel 3 start seq and end enq are 0 and 0
2023-09-26 08:48:23 DEBUG process channel 4 start seq and end enq are 1 and 0
2023-09-26 08:48:23 INFO getBlockAndBlockResult retrieved greenfield block at height=814646
2023-09-26 08:48:24 INFO monitorCrossChainPkgAt retrieved BSC block header at height=33673726
2023-09-26 08:48:25 DEBUG process start seq and end enq are 0 and 1199
2023-09-26 08:48:25 INFO getBlockAndBlockResult retrieved greenfield block at height=814647
2023-09-26 08:48:26 INFO UpdateClientLoop start to monitor bsc data-seeds healthy
cool!
System information
Relayer version: v0.2.5 OS & Version: Ubuntu 22.04.1 LTS Commit hash : develop commit 1d61cc8dc259ecfa1fca9494f1a5d35b1da1dda5
Compile
make build_docker
Run Command
docker run -it -v $(pwd)/config.json:/app/config/config.json -e CONFIG_TYPE="local" -e CONFIG_FILE_PATH=/app/config/config.json -d ghcr.io/bnb-chain/greenfield-relayer
config.json
part :
"rpc_addrs": [ "https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org" ],
error: