Skip to content

Benchmarking test: commitment calculation #295

Description

@bitcartel

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions