Skip to content

Async score verification. - #1060

Open
cyber-pc wants to merge 8 commits into
developfrom
feature/2026-10-30-async-score-verification
Open

cyber-pc wants to merge 8 commits into
developfrom
feature/2026-10-30-async-score-verification

Conversation

@cyber-pc

@cyber-pc cyber-pc commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Mining solutions are no longer scored inside the tick that carries them. The tick only records them.
The solution processors score them in the background, and the tick W ticks later settles them: score into the digest, tree commit, deposit refund and ranking. A burst of solutions should not makes the tick slow.

Mechanism

W - SOLUTION_SETTLEMENT_WINDOW_TICKS: defered window in ticks
For a solution transaction in tick T:

  1. Tick T, record: cheap checks only, then the solution is appended to the settlement window.
  2. Ticks T+1 to T+W, score: the solution processors score it in the background, in any order.
  3. END_TICK of T+W, settle: fold the score into the digest, commit to the tree, refund the deposit, update the ranking, in (tick, txIndex) order.

What a tick settles depends only on its tick number, so every node settles the same solutions at the same tick.
On the last tick of an epoch, every pending solution is settled inside that tick (the drain).

Visible changes

  • The refund and the ranking come W ticks after the solution's tick, not in the same tick.
  • A solution can use a parent only after the parent has settled: the child's tick must be at least (W+1) ticks after the parent's. Children of the root are not affected.
  • New snapshot files: snapshotAsyncScoreHeader.<epoch> and snapshotAsyncScoreRecords.<epoch>.<chunk>.

@cyber-pc

cyber-pc commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

This PR is being tested, expect go with release of epoch 239, not next release.

@cyber-pc
cyber-pc requested a review from fnordspace November 3, 2026 02:56
@cyber-pc cyber-pc self-assigned this Nov 3, 2026
@fnordspace fnordspace added this to qubic Nov 3, 2026
@fnordspace fnordspace moved this to 👀 In review in qubic Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

2 participants