Draft
Conversation
| tx->inputSize = 8 + sizeof(OI::DogeShareValidation::OracleQuery); | ||
| unsigned char* queryData = buffer + sizeof(Transaction); | ||
| *reinterpret_cast<uint32_t*>(queryData) = OI::DogeShareValidation::oracleInterfaceIndex; | ||
| *reinterpret_cast<uint32_t*>(queryData + 4) = 2000; // timeout im milliseconds |
Contributor
There was a problem hiding this comment.
A timeout of 2 seconds is too low, because commit and reveal take at least 7 ticks. I usually set the timeout to 30 seconds or 60 seconds, but we may also try something like 15 seconds.
|
|
||
| KangarooTwelve(buffer, sizeof(Transaction) + tx->inputSize, digest.m256i_u8, sizeof(digest)); | ||
| sign(computorSubseeds[i].m256i_u8, computorPublicKeys[i].m256i_u8, digest.m256i_u8, tx->signaturePtr()); | ||
| enqueueResponse(NULL, tx->totalSize(), BROADCAST_TRANSACTION, 0, tx); |
Contributor
There was a problem hiding this comment.
We will need a mechanism for sending the tx again if the tx isn't included in system.tick + TICK_TRANSACTIONS_PUBLICATION_OFFSET or if it is an empty tick. You may just add this as a TODO note for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds processing of doge tasks and solutions to the core node.
A new
CustomQubicMiningStorageclass is introduced to save active tasks and keep record of solutions to prevent duplicate solutions from being broadcasted. The class is designed to support other custom mining tasks apart from doge in the future.Apart from adding tasks and solutions to the storage, the core node will send an oracle query for share validation if the solution came from a computor pool matching its own comp id.
Missing features: