Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f390f43
Adapt the score_bpp9000 with the ant colony.
cyber-pc Aug 2, 2026
01bb6ae
Change the score queue support a generic task base.
cyber-pc Aug 3, 2026
85b5db5
Replace ACQUIRE/RELEASE with LockGuard.
cyber-pc Aug 4, 2026
00af787
Improve the canonical nonce check
cyber-pc Aug 4, 2026
50e8c65
Add message and transaction for ant.
cyber-pc Aug 4, 2026
037670a
Move the code relate to update miner ranking to separate function.
cyber-pc Aug 4, 2026
28a3df6
Add the ant colony tree and validity rules
cyber-pc Aug 5, 2026
5ba7646
Add the ant colony lifecycle and per-tick anchor digests
cyber-pc Aug 7, 2026
693813c
Main score function for the ant colony.
cyber-pc Aug 7, 2026
7245389
Handle the solution transaction of ant colony.
cyber-pc Aug 7, 2026
fdb8fb9
Score ant solutions on the task queue and add a seen filter
cyber-pc Aug 7, 2026
80db1c5
Improve the ant colony test
cyber-pc Aug 7, 2026
223a378
Support save load snapshot for ant colony.
cyber-pc Aug 7, 2026
6f07fc0
Add the score cache for ant colony.
cyber-pc Aug 8, 2026
8fab23c
Handle the case ant colony tree is full.
cyber-pc Aug 8, 2026
8d49a2b
Collect best ANN at the end of epoch
cyber-pc Aug 8, 2026
f1524ff
Implement request responde for mineableParent and ant's stats in epoch.
cyber-pc Aug 8, 2026
5224c4a
Print stats of ant colony
cyber-pc Aug 8, 2026
4d41c3f
Add ant colony retries queue.
cyber-pc Aug 9, 2026
b8ce241
Queue and publish pool ant solutions.
cyber-pc Aug 9, 2026
5a69349
Enable logging for ant colony.
cyber-pc Aug 9, 2026
875f8a4
Pre-score ant solution transactions at arrival.
cyber-pc Aug 9, 2026
e5c1d33
Enable ant cache saving.
cyber-pc Aug 9, 2026
5013689
Rename the ant ANN state message pair to parent ANN.
cyber-pc Aug 9, 2026
d7db85e
Allow fetch the ANN state of a node.
cyber-pc Aug 9, 2026
833ce2a
Add debug log message for ant colony.
cyber-pc Aug 9, 2026
90f07a0
Bind the ant canonical-nonce rule to the scorer and dispatch by algor…
cyber-pc Aug 9, 2026
2b029f8
Gather the ant colony file names in public_settings.
cyber-pc Aug 9, 2026
0fca52f
Move ant colony related files to the same folder.
cyber-pc Aug 9, 2026
785e4c5
Reject ant solutions whose parent is in the current or a later tick.
cyber-pc Aug 9, 2026
639a087
Make the ant anchor-ring seqlock reader use atomic tick loads
cyber-pc Aug 9, 2026
3e064da
Validate the ant export-set order as a permutation on snapshot load
cyber-pc Aug 9, 2026
25d572a
Pin the bpp9000 score multiplier to 1 with a static assert.
cyber-pc Aug 9, 2026
9476c8b
Combine the ant snapshot meta, anchors and export into one header file.
cyber-pc Aug 10, 2026
8185203
Use a dedicated colony buffer for the snapshot header
cyber-pc Aug 10, 2026
53d3243
Fold the ant snapshot save/load into ant_colony.h
cyber-pc Aug 10, 2026
96cfa37
Gather the ant colony file-scope constants at the top of ant_colony.h
cyber-pc Aug 10, 2026
6e31a45
Replace the ant sibling floor with a per-parent child cap.
cyber-pc Aug 10, 2026
0c93194
Rename the request-respond for get mine nodes.
cyber-pc Aug 10, 2026
1a3fff1
Support request the max number of children per ant node.
cyber-pc Aug 11, 2026
65087fd
Update documentation for ant colony.
cyber-pc Aug 12, 2026
524ff25
Set the number of children to unbound.
cyber-pc Aug 14, 2026
20768f6
Update the antEpochContext with task file's digest.
cyber-pc Aug 13, 2026
88a6a37
Ant colony parent tick uses the absolute tick for consistency.
cyber-pc Aug 13, 2026
519147e
Update unit test for ant colony.
cyber-pc Aug 14, 2026
9bcb561
Disable standalone bpp9000
cyber-pc Aug 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
375 changes: 375 additions & 0 deletions doc/ant_colony_mining.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The following transaction types (`tx->inputType`) are defined:
- `ExecutionFeeReportTransactionPrefix`, type 9, defined in `src/network_messages/execution_fees.h`.
- `OracleUserQueryTransactionPrefix`, type 10, defined in `src/oracle_core/oracle_transactions.h`.
- `DogeMiningShareTransaction`, type 11, defined in `src/mining/mining.h`.
- `AntColonyMiningSolutionTransaction`, type 12, defined in `src/mining/mining.h`.


## Peer Sharing
Expand Down
5 changes: 5 additions & 0 deletions src/Qubic.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,20 @@
<ClInclude Include="files\files.h" />
<ClInclude Include="logging\logging.h" />
<ClInclude Include="logging\net_msg_impl.h" />
<ClInclude Include="mining\ant_colony\ant_colony.h" />
<ClInclude Include="mining\ant_colony\ant_colony_bpp9000.h" />
<ClInclude Include="mining\ant_colony\ant_pending_solutions.h" />
<ClInclude Include="mining\custom_qubic_mining_storage.h" />
<ClInclude Include="mining\mining.h" />
<ClInclude Include="mining\score_bpp9000.h" />
<ClInclude Include="mining\score_common.h" />
<ClInclude Include="mining\score_engine.h" />
<ClInclude Include="mining\task_file.h" />
<ClInclude Include="mining\trit_pack.h" />
<ClInclude Include="network_core\peers.h" />
<ClInclude Include="network_core\tcp4.h" />
<ClInclude Include="network_messages\all.h" />
<ClInclude Include="network_messages\ant_colony_message.h" />
<ClInclude Include="network_messages\network_message_type.h" />
<ClInclude Include="network_messages\assets.h" />
<ClInclude Include="network_messages\broadcast_message.h" />
Expand Down
18 changes: 18 additions & 0 deletions src/Qubic.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
<ClInclude Include="network_messages\all.h">
<Filter>network_messages</Filter>
</ClInclude>
<ClInclude Include="network_messages\ant_colony_message.h">
<Filter>network_messages</Filter>
</ClInclude>
<ClInclude Include="network_messages\header.h">
<Filter>network_messages</Filter>
</ClInclude>
Expand Down Expand Up @@ -185,6 +188,18 @@
<ClInclude Include="mining\mining.h">
<Filter>mining</Filter>
</ClInclude>
<ClInclude Include="mining\ant_colony\ant_colony.h">
<Filter>mining\ant_colony</Filter>
</ClInclude>
<ClInclude Include="mining\ant_colony\ant_pending_solutions.h">
<Filter>mining\ant_colony</Filter>
</ClInclude>
<ClInclude Include="mining\ant_colony\ant_colony_bpp9000.h">
<Filter>mining\ant_colony</Filter>
</ClInclude>
<ClInclude Include="mining\trit_pack.h">
<Filter>mining</Filter>
</ClInclude>
<ClInclude Include="logging\logging.h">
<Filter>logging</Filter>
</ClInclude>
Expand Down Expand Up @@ -456,6 +471,9 @@
<Filter Include="mining">
<UniqueIdentifier>{df525479-7504-470c-a25a-de4af8be0e5d}</UniqueIdentifier>
</Filter>
<Filter Include="mining\ant_colony">
<UniqueIdentifier>{7b1f3a52-9c4e-4d2a-b8e6-2a5c9d417f60}</UniqueIdentifier>
</Filter>
<Filter Include="logging">
<UniqueIdentifier>{d334594b-f24d-440e-949a-c791aa13f867}</UniqueIdentifier>
</Filter>
Expand Down
18 changes: 18 additions & 0 deletions src/logging/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ struct Peer;
#define CUSTOM_MESSAGE_OP_END_DISTRIBUTE_DIVIDENDS 6217575821008457285ULL //END_DDIV
#define CUSTOM_MESSAGE_OP_START_EPOCH 4850183582582395987ULL // STA_EPOC
#define CUSTOM_MESSAGE_OP_END_EPOCH 4850183582582591045ULL //END_EPOC
#define CUSTOM_MESSAGE_ANT_SOLUTION 6146374810954124865ULL // ANT_SOLU
/*
* STRUCTS FOR LOGGING
*/
Expand Down Expand Up @@ -191,6 +192,23 @@ struct DummyCustomMessage
char _terminator; // Only data before "_terminator" are logged
};

// On-chain outcome of one ant-colony solution transaction (accepted or rejected),
// identified by its dedup key (sourcePublicKey, parentRef, nonce).
struct AntSolutionLogMessage
{
unsigned long long _type; // CUSTOM_MESSAGE_ANT_SOLUTION
m256i sourcePublicKey;
m256i nonce;
unsigned int parentTick;
unsigned int parentSolutionIndexInTick;
unsigned int anchorTick;
unsigned int score;
// ValidityResult of the commit
unsigned int result;

char _terminator; // Only data before "_terminator" are logged
};

struct Burning
{
m256i sourcePublicKey;
Expand Down
Loading
Loading