Develop e228 - #73
Merged
Merged
Conversation
Rollback corrections found in review: - do not restore the anchor ring. recordAnchorDigest() runs after the capture point and the digest is K12(tick || K12(TickData)), which a re-run does not change; putting the pre-tick value back left a hole nothing re-records, so later solutions anchored to that tick were rejected as stale on this node only. - re-arm the capture after restoring inside reprocessSolutionTransaction. The function can be entered twice for the same tick, and a disarmed second restore left the first replay's commits in the tree while the caller restored resourceTestingDigest again. Test drivers, both single-machine: - --force-broadcast-ant-solution <mode>: the node mines against its own colony and publishes the result, replacing --fbis which goes inert now that standalone bpp9000 is disabled. Modes valid, badclaim, noncanon, wrongtree, stale, futureparent, leparent reach one accept rule each. - --force-reprocess-every N: run the rollback and replay every N ticks regardless of quorum agreement. On a tick whose solutions are all valid it must reproduce the spectrum digest, resourceTestingDigest, colony node count and miner count, so a mismatch is a rollback bug. recomputeSaltedSpectrumDigest() extracted from the quorum-mismatch path so the forced check measures the same thing rather than a copy. LITE_ANT_TICK_ROLLBACK is now a CMake option on both targets, so the node can be built without the rollback to A/B it against fork-based rollback.
reprocessSolutionTransaction() copied from ts.tickData.getByTickIfNotEmpty() without checking the result. That returns null for an empty tick, so the copy segfaulted. Latent until now: the quorum-mismatch trigger implies a solution in the tick, and a tick with a solution is never empty. --force-reprocess-every reaches it on the first void tick. PORT is now overridable at build time (-DPORT=...), so a node can run on a box where the default peer port is already taken.
…on ticks A bpp9000 walk takes about ten seconds here, and the injector ran up to eight of them inside processTick, so the tick processor sat in scoreSIMD for minutes and the node looked stalled. It now runs on a dedicated thread, one attempt per tick, the way an external miner would. --force-reprocess-every skipped nothing on empty ticks, but the rollback baselines it compares against are captured inside processTick's transaction path, which an empty tick never enters. Gate the check on the tick having carried a solution transaction.
Every node walks each ant solution, so an honest aux always reaches the same verdict as main and the quorum-mismatch path is unreachable in a two-node testnet. This flag makes an aux node take the claimed score on the first pass without walking; a main publishing deliberately wrong claims then forces the real mismatch, and the replay walks for real. Test only, aux only.
It mined one solution per tick indefinitely. A walk costs about 25 seconds of CPU and every publish burns a 1,000,000 QU deposit, so a soak only needs a handful. The flag now takes <mode> or <mode>:<count>, defaults to 3, and the miner thread exits once the budget is spent.
* Adapt the score_bpp9000 with the ant colony. * Change the score queue support a generic task base. * Replace ACQUIRE/RELEASE with LockGuard. * Improve the canonical nonce check * Add message and transaction for ant. * Move the code relate to update miner ranking to separate function. * Add the ant colony tree and validity rules * Add the ant colony lifecycle and per-tick anchor digests * Main score function for the ant colony. * Handle the solution transaction of ant colony. * Score ant solutions on the task queue and add a seen filter * Improve the ant colony test * Support save load snapshot for ant colony. * Add the score cache for ant colony. * Handle the case ant colony tree is full. * Collect best ANN at the end of epoch * Implement request responde for mineableParent and ant's stats in epoch. * Print stats of ant colony * Add ant colony retries queue. * Queue and publish pool ant solutions. * Enable logging for ant colony. * Pre-score ant solution transactions at arrival. * Enable ant cache saving. * Rename the ant ANN state message pair to parent ANN. * Allow fetch the ANN state of a node. * Add debug log message for ant colony. * Bind the ant canonical-nonce rule to the scorer and dispatch by algorithm. * Gather the ant colony file names in public_settings. * Move ant colony related files to the same folder. * Reject ant solutions whose parent is in the current or a later tick. * Make the ant anchor-ring seqlock reader use atomic tick loads * Validate the ant export-set order as a permutation on snapshot load * Pin the bpp9000 score multiplier to 1 with a static assert. * Combine the ant snapshot meta, anchors and export into one header file. * Use a dedicated colony buffer for the snapshot header * Fold the ant snapshot save/load into ant_colony.h * Gather the ant colony file-scope constants at the top of ant_colony.h * Replace the ant sibling floor with a per-parent child cap. * Rename the request-respond for get mine nodes. * Support request the max number of children per ant node. * Update documentation for ant colony. * Set the number of children to unbound. * Update the antEpochContext with task file's digest. * Ant colony parent tick uses the absolute tick for consistency. * Update unit test for ant colony. * Disable standalone bpp9000 * Copy the computor list first before the epoch. * Use asyncsave for collection best ann solution at the end of epoch. * Ant score cache replicate behavior of standalone score cache. * Update ant colony parameters. * Update document for ant colony's files. * Update ant colony about ANN's LUT layout. * Document the empty-tick anchor rule.
Seat 0's root network fails to self-clock under this pool, so its walk returns INFINITE_ERROR and never publishes.
Reconciles the upstream ant squash with ours and drops the hand-built ant tick rollback, which fork() rollback replaces.
Replaces the hand-maintained solution rollback with develop's fork() tick rollback and normalizes qubic.cpp to LF.
Both sides carried the same block; the merge kept both copies.
Records can now be committed with an unmaterialised ANN slot and have the network walked back later from the nearest ancestor that still holds one. Replay cache keys the parent by ref so a lookup no longer needs it.
An AUX tick outside the strict paths takes the claimed score, over-accepts the three rules decided by it, and lets the fork checkpoint undo the tick when the spectrum then disagrees with quorum. Ant solutions now open a checkpoint window, which the over-accept requires.
fnordspace
approved these changes
Aug 26, 2026
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.
No description provided.