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

Benchmarking test: commitment calculation #295

Open
bitcartel opened this issue May 5, 2024 · 2 comments
Open

Benchmarking test: commitment calculation #295

bitcartel opened this issue May 5, 2024 · 2 comments

Comments

@bitcartel
Copy link

Just wanted to check this is the intended behaviour for the benchmarking test in batch mode.

randomx_calculate_commitment is invoked using the blockTemplate buffer containing the new nonce, and the hash value which was computed for the old nonce.

if (batch) {
	nonce = atomicNonce.fetch_add(1);
}
store32(noncePtr, nonce);
(batch ? randomx_calculate_hash_next : randomx_calculate_hash)(vm, blockTemplate, sizeof(blockTemplate), &hash);
if (commit) {
	randomx_calculate_commitment(blockTemplate, sizeof(blockTemplate), &hash, &hash);
}

https://github.com/tevador/RandomX/blob/master/src/tests/benchmark.cpp#L143

@SChernykh
Copy link
Collaborator

@tevador It seems to be a bug in the benchmarking code.

@tevador
Copy link
Owner

tevador commented May 5, 2024

//TODO: support batch mode with commitments

Not a bug, just not implemented.

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

3 participants