godwokenrises / godwoken-kicker

one line command to start godwoken-polyjuice chain.
19 stars 23 forks source link

deposit ckb to default account succeed but got failed to get_registry_address_by_script_hash warning #229

Open BourneNeo opened 2 years ago

BourneNeo commented 2 years ago

environment: Linux DESKTOP-Q1QBGQQ 5.10.102.1-microsoft-standard-WSL2 https://github.com/RetricSu/godwoken-kicker/issues/1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

prerequisites:

Docker version 20.10.12, build e91ed57 docker-compose version 1.29.2, build 5becea4c (3. local ckb node not running) details: $ ./kicker deposit 0x618cc3C660cEBFDbA8570CA739b1744AE3E2553a 1000 Creating docker_godwoken_run ... done [2022-04-18T23:42:11Z INFO gw_tools::deposit_ckb] eth address: 0x618cc3c660cebfdba8570ca739b1744ae3e2553a [2022-04-18T23:42:11Z INFO gw_tools::deposit_ckb] layer2 script hash: 0xef2804ee2a65ddb5243b50fe792f2dae08fb1e91a74017b9999564198a561bc8 [2022-04-18T23:42:11Z INFO gw_tools::deposit_ckb] script hash: 0xef2804ee2a65ddb5243b50fe792f2dae08fb1e91a74017b9999564198a561bc8 [2022-04-18T23:42:11Z WARN gw_tools::deposit_ckb] failed to get_registry_address_by_script_hash, invalid type: null, expected struct RegistryAddress [2022-04-18T23:42:11Z INFO gw_tools::deposit_ckb] balance before deposit: 0 [2022-04-18T23:42:13Z INFO gw_tools::deposit_ckb] tx_hash: 0xa12fc1ab08958d1c3c70c6d8d976471ac5ee9b3415b4e1bd5de4bdd1f39d433d [2022-04-18T23:42:13Z INFO gw_tools::utils::transaction] waiting tx a12fc1ab08958d1c3c70c6d8d976471ac5ee9b3415b4e1bd5de4bdd1f39d433d [2022-04-18T23:42:18Z INFO gw_tools::utils::transaction] tx pending [2022-04-18T23:42:23Z INFO gw_tools::utils::transaction] tx pending [2022-04-18T23:42:29Z INFO gw_tools::utils::transaction] tx pending [2022-04-18T23:42:34Z INFO gw_tools::utils::transaction] tx proposed [2022-04-18T23:42:39Z INFO gw_tools::utils::transaction] tx proposed [2022-04-18T23:42:44Z INFO gw_tools::utils::transaction] tx commited [2022-04-18T23:42:46Z INFO gw_tools::deposit_ckb] current balance: 100000000000, waiting for 2 secs. [2022-04-18T23:42:46Z INFO gw_tools::deposit_ckb] deposit success! [2022-04-18T23:42:46Z INFO gw_tools::deposit_ckb] Your account id: 7 Deposit finished

Flouse commented 2 years ago

After get_registry_address_by_script_hash fails, deposit action will retry automatically. And you could see Deposit finished at the last line of the log.

[2022-04-18T23:42:46Z INFO gw_tools::deposit_ckb] current balance: 100000000000, waiting for 2 secs.
[2022-04-18T23:42:46Z INFO gw_tools::deposit_ckb] deposit success!
[2022-04-18T23:42:46Z INFO gw_tools::deposit_ckb] Your account id: 7
Deposit finished
keroro520 commented 2 years ago

I think this warning log makes users confusing, including me.

Could you please help to adjust this log? @Flouse

Flouse commented 2 years ago

Could you please help to adjust this log? @Flouse

Let's add a line of log telling user the retry mechanism? e.g.

WARN gw_tools::deposit_ckb] failed to get_registry_address_by_script_hash, invalid type: null, expected struct RegistryAddress
INFO The account is not ready, will retry...
keroro520 commented 2 years ago

Could you please help to adjust this log? @Flouse

Let's add a line of log telling user the retry mechanism? e.g.

WARN gw_tools::deposit_ckb] failed to get_registry_address_by_script_hash, invalid type: null, expected struct RegistryAddress
INFO The account is not ready, will retry...

Or maybe just set the log level to "debug"?

Flouse commented 2 years ago

Or maybe just set the log level to "debug"?

LGTM