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

misleading JDC logs need to be refactored #1280

Open
pavlenex opened this issue Dec 9, 2024 · 3 comments
Open

misleading JDC logs need to be refactored #1280

pavlenex opened this issue Dec 9, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@pavlenex
Copy link
Collaborator

pavlenex commented Dec 9, 2024

While testing I've found a few possibly typos or grammatical errors:

Before anyone tries to resolve them, developer on the project needs to confirm my interpretation is correct.

  1. 2024-12-09T18:17:08.807208Z ERROR roles_logic_sv2::channel_logic::channel_factory: Share does not meet any target: Extended(SubmitSharesExtended { channel_id: 5, sequence_number: 0, job_id: 22, nonce: 258540344, ntime: 1733768213, version: 551460864, extranonce: Owned([0, 0, 0, 0, 0, 0, 0, 1, 255, 2, 0, 0, 0, 0, 0, 0]) }) 2024-12-09T18:17:08.812152Z ERROR jd_client::lib::downstream: Share do not meet downstream target

Should probably be Share does not meet downstream target

  1. `2024-12-09T18:13:42.066868Z WARN jd_client::lib::upstream_sv2::upstream: SNPH received from upstream, proxy ignore it, and use the one declared by JOB DECLARATOR

Should probably be SNPH received from the upstream, proxy ignored it, and used the one declared by the JOB DECLARATOR CLIENT JOB DECLARATOR CLIENT is probably what's needed here, I am unsure, a dev needs to confirm.

@plebhash
Copy link
Collaborator

it feels to me that the real essence of this issue is not typos or gramatical mistakes on the logs

it's the fact that the entire log messages are misleading with regards to what is really happening

quoting @GitGab19 from discord:

The meaning is that JDC received a SetNewPrevHash message from upstream (Pool), but it's going to use the one received by the TP connected to JDC itself

so the real solution would be to completely rewrite these logs, without necessarily focusing on typos, but rather aiming to clarify what's really happening


on a personal note, while re-writing these logs, I would avoid:

  • acronyms. For example: don't write SNPH, write SetNewPrevHash
  • capitalization. For example: don't write JOB DECLARATOR CLIENT, write Job Declarator Client

@plebhash plebhash changed the title Grammatical errors in logs messages misleading JDC logs need to be re-written Dec 10, 2024
@plebhash plebhash changed the title misleading JDC logs need to be re-written misleading JDC logs need to be refactored Dec 10, 2024
@plebhash
Copy link
Collaborator

moving forward to merge #1281

but based on my comment above, I believe the scope of this issue is still yet to be fully addressed

@pavlenex
Copy link
Collaborator Author

pavlenex commented Dec 10, 2024

Current one:
SNPH received from upstream, proxy ignored it, and used the one declared by JDC

Suggested one:

SetNewPrevHash received from the Upstream, JDC ignores it and used the one by the local Template Provider?

Or did you have something else in mind? Unsure how local TP fits into here.

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

No branches or pull requests

2 participants