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

initNonce extraNonce position #5982

Closed
dizcza opened this issue Feb 3, 2025 · 4 comments
Closed

initNonce extraNonce position #5982

dizcza opened this issue Feb 3, 2025 · 4 comments
Assignees

Comments

@dizcza
Copy link

dizcza commented Feb 3, 2025

Shouldn't this line

memcpy(nonce + sizeof(uint32_t), &extraNonce, sizeof(uint32_t));

be

memcpy(nonce + sizeof(uint64_t) + sizeof(uint32_t), &extraNonce, sizeof(uint32_t));

?

@fifieldt
Copy link
Contributor

fifieldt commented Feb 4, 2025

@jp-bennett might know

@esev
Copy link
Contributor

esev commented Feb 4, 2025

@jp-bennett
Copy link
Collaborator

I definitely need to do some better documentation of this. The problem is that it is a mess, and we've had to work to keep it backwards compatible. The Packet ID is actually only 32 bits. I think the draft patch from @esev gets it right. I didn't have time to dive deeply into that when he posted it, and honestly forgot to go back and look again.

@dizcza
Copy link
Author

dizcza commented Feb 4, 2025

I see. The draft PR clarified my question.

Well, it's been a month since it was created.

@dizcza dizcza closed this as completed Feb 4, 2025
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

4 participants