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

Improve error message when JDS can't connect to a local TP #730

Closed
pavlenex opened this issue Jan 23, 2024 · 2 comments · Fixed by #727 or #733
Closed

Improve error message when JDS can't connect to a local TP #730

pavlenex opened this issue Jan 23, 2024 · 2 comments · Fixed by #727 or #733
Assignees
Milestone

Comments

@pavlenex
Copy link
Collaborator

For JDS a local Template Provider needs to run first otherwise this happens:

2024-01-23T09:21:59.599341Z  INFO jd_server::lib::job_declarator: JD INITIALIZED
thread 'tokio-runtime-worker' panicked at jd-server/src/lib/mempool/mod.rs:60:77:
called `Result::unwrap()` on an `Err` value: JsonRpc(Transport(SocketError(Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at jd-server/src/lib/mempool/mod.rs:75:14:
called `Result::unwrap()` on an `Err` value: JoinError::Panic(Id(10), ...)

We should ensure a better error message is presented to the user. Problem is that JDS can't connect to TP to local TP for a few reasons, and we have no way apparently to know what are these reasons (TP not fully synced, TP down).

Suggested message could be: Unable to connect to TP (possible reasons: not fully synced, down)

@pavlenex pavlenex added this to the Milestone 4 milestone Jan 23, 2024
@GitGab19
Copy link
Collaborator

GitGab19 commented Jan 23, 2024

I would add that another issue is that the JDS mempool is updated every 10 seconds, which is hardcoded here.
The update rate should be configurable by the user.
I'm working on fixing both issues, I will open a PR soon

GitGab19 added a commit to GitGab19/stratum that referenced this issue Jan 23, 2024
@GitGab19 GitGab19 linked a pull request Jan 23, 2024 that will close this issue
@GitGab19
Copy link
Collaborator

I would add that another issue is that the JDS mempool is updated every 10 seconds, which is hardcoded here. The update rate should be configurable by the user. I'm working on fixing both issues, I will open a PR soon

I fixed them here: #727

@pavlenex pavlenex modified the milestones: Milestone 4, Milestone 3 Jan 23, 2024
GitGab19 added a commit to GitGab19/stratum that referenced this issue Jan 25, 2024
@GitGab19 GitGab19 linked a pull request Jan 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants