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

Panic if RPC connection error raised #165

Open
rantan opened this issue May 17, 2023 · 0 comments
Open

Panic if RPC connection error raised #165

rantan opened this issue May 17, 2023 · 0 comments

Comments

@rantan
Copy link
Contributor

rantan commented May 17, 2023

The tapyrus-signer daemon stop if tapyrusd RPC connection error happened.

logs

Success, daemonized
[2023-05-17T03:09:04Z TRACE tapyrus_signer::rpc] JSON-RPC request: {"method":"getblockchaininfo","params":[],"id":1,"jsonrpc":"2.0"}
[2023-05-17T03:09:04Z TRACE tapyrus_signer::rpc] JSON-RPC response: getblockchaininfo: {"result":{"aggregatePubkeys":[{"0366262690cbdf648132ce0c088962c6361112582364ede120f3780ab73438fc4b":0}],"bestblockhash":"79ea057b17b2f4b05d6433e9d19a3ef53fcc8f729d97bca768a4981e3c07476a","blocks":302668,"chain":"1939510133","headers":302668,"initialblockdownload":false,"mediantime":1684290751,"mode":"prod","pruned":false,"size_on_disk":96151958,"verificationprogress":1,"warnings":""},"error":null,"id":1,"jsonrpc":null}
[2023-05-17T03:09:04Z INFO  tapyrus_signer::signer_node] Skip waiting for ibd finish.
[2023-05-17T03:09:04Z INFO  tapyrus_signer::signer_node] Start thread for redis subscription
[2023-05-17T03:09:04Z INFO  tapyrus_signer::signer_node] Start Key generation Protocol
[2023-05-17T03:09:04Z INFO  tapyrus_signer::signer_node] Idle 5 secs...
[2023-05-17T03:09:09Z INFO  tapyrus_signer::signer_node] Start block creation rounds.
[2023-05-17T03:09:09Z TRACE tapyrus_signer::rpc] JSON-RPC request: {"method":"getblockchaininfo","params":[],"id":2,"jsonrpc":"2.0"}
[2023-05-17T03:09:09Z TRACE tapyrus_signer::timer] Start Timer name=round_timer timelimit=305s
[2023-05-17T03:09:09Z TRACE tapyrus_signer::rpc] JSON-RPC response: getblockchaininfo: {"result":null,"error":{"code":-28,"message":"Loading block index...","data":null},"id":2,"jsonrpc":null}
[2023-05-17T03:09:09Z WARN  tapyrus_signer::rpc] RPC Error: RpcError { code: -28, message: "Loading block index...", data: None }
thread 'main' panicked at 'Couldn't start the node because of an RPC connection error.', src/signer_node/mod.rs:429:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[2023-05-17T03:14:14Z TRACE tapyrus_signer::timer] Stop Timer by time out name=round_timer
[2023-05-17T03:14:14Z TRACE tapyrus_signer::timer] RoundTimeoutObserverThread finished.

I think it should retry to call the RPC until the tapyrusd process wil be getting ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant