Skip to content

Doge Task/Solution Processing#810

Draft
Franziska-Mueller wants to merge 7 commits intodevelopfrom
feature/2026-03-19-process-doge-packets
Draft

Doge Task/Solution Processing#810
Franziska-Mueller wants to merge 7 commits intodevelopfrom
feature/2026-03-19-process-doge-packets

Conversation

@Franziska-Mueller
Copy link
Collaborator

@Franziska-Mueller Franziska-Mueller commented Mar 26, 2026

This PR adds processing of doge tasks and solutions to the core node.

A new CustomQubicMiningStorage class 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:

  • retry failed oracle queries
  • increase revenue for validated doge shares

@Franziska-Mueller Franziska-Mueller changed the base branch from main to develop March 26, 2026 18:08
@Franziska-Mueller Franziska-Mueller marked this pull request as draft March 26, 2026 18:12
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Successfully merging this pull request may close these issues.

2 participants