Wallet address and view key are valid per epoch and shared after an epoch ends on the Qubic discord.
The POC is junked into Phases.
- Basic Testing of Messaging ✅
- Connect Qubic Messaging with Monero (Bridging)✅
- End-To-End Messaging (including signaling and real monero tasks) ✅
- Solution Validation (Oracle) and Revenue Calculation ✅
- Final Test Round ✅
- Go-Live ✅ See stats page
For the POC we need high speed delivery of tasks and solutions. We will build on top of the Qubic Broadcast Message to achieve this.
Threfore we introduce two new message types:
-
#define MESSAGE_TYPE_CUSTOM_MINING_TASK 1 -
#define MESSAGE_TYPE_CUSTOM_MINING_SOLUTION 2 -
Custom Mining Task This type is used by ARB to send out a Task. The interval between tasks is dynamic and may vary from a few seconds up to a few 10s of seconds.
The Task struct
struct
{
unsigned int sizeAndType;
unsigned int dejavu;
unsigned char sourcePublicKey[32]; // the source public key is the DISPATCHER public key
unsigned char zero[32]; // empty/zero 0
unsigned char gammingNonce[32];
unsigned long long taskIndex; // ever increasing number (unix timestamp in ms)
unsigned char m_template[896]; // monero block template
unsigned long long m_extraNonceOffset; // offset to place extra nonce
unsigned long long m_size; // size of template
unsigned long long m_target; // target difficulty
unsigned long long m_height; // current network height
unsigned char m_seed[32]; // seed hash for XMR
unsigned char signature[64];
} task;Note
The shared key for Destination=0 is all-zeros
To verify the message, please refer to https://github.com/qubic/core/blob/main/src/qubic.cpp#L474 To find the message type, please refer to https://github.com/qubic/core/blob/main/src/qubic.cpp#L555
- Custom Mining Solution After Processing the Task and generating the solution. The solution needs to be sent back to the network.
The Solution struct
struct
{
unsigned int sizeAndType;
unsigned int dejavu;
unsigned char sourcePublicKey[32];
unsigned char zero[32]; // empty/zero 0
unsigned char gammingNonce[32];
unsigned long long taskIndex; // sohuld match the index from task
unsigned long long combinedNonce; // (extraNonce<<32) | nonce
unsigned long long encryptionLevel; // 0 = no encryption, 2 = EP173+ encryption
unsigned long long computorRandom; // random number which fullfils the condition computorRandom % 676 == ComputorIndex
unsigned long long reserve2; // reserved
unsigned char result[32]; // xmrig::JobResult.result
unsigned char signature[64];
} solution;Caution
The Above structs already contain the RequestResponseHeader.
For the POC we gonna try with XMRig. If you want to user your own. Feel free to do so.
Connect to the network and listen for the packet type BROADCAST_MESSAGE (1).
Identify a Task:
- The source must be DISPATCHER
- Verify Signature
- Check the Message type (sample: https://github.com/qubic/core/blob/main/src/qubic.cpp#L555)
- Verify
taskIndexis higher than previous loaded task
If the above match, use that task and proceed with solution finding.
If you have found a solution, pack it into the solution struct.
sourcePublicKeymust be your computor public keytaskIndexmust be the task indes from recevied taskcombinedNoncemust be the xmrig::JobResult.nonce + your extranonce ((extraNonce<<32) | nonce) and equal to avaluesuch thatfirstComputorIndex + nonce % (676 / task.NumberOfUpstreams) == computorIndexencryptionLevelmust be2= EP173+ Encryption;0is allowed for legacy purposescomputorRandom(exreserve1) must be a random number and equal avaluesuch thatcomputorRandom % 676 == computorIndex;0is allowed for legacy purposesresultmust be the result from xmrig::JobResult.result
Sign your solution packet with your computor seed. make the dejavu = 0 to allow propagation of your solution in the network.
Caution
Non encrypted solutions are legacy and may be not accepted by ARB. Please use latest encryption level.
Please reach out to the core development team with a signed message from your computor to receive latest instructions.
