Skip to content

Keep mining reward maturity in the block wallet checkpoint - #2514

Open
a-shannon wants to merge 9 commits into
ergoplatform:masterfrom
a-shannon:fix/wallet-maturity-accounting
Open

a-shannon wants to merge 9 commits into
ergoplatform:masterfrom
a-shannon:fix/wallet-maturity-accounting

Conversation

@a-shannon

@a-shannon a-shannon commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Mining rewards change scan associations in the same versioned registry update as the block that matures them. This preserves external scan memberships, accounts for rewards spent in that block and restores preceding associations on rollback. Rewards already associated with payments are not credited twice.

Direct coverage includes shared scans, ERG and token balances, spending with history enabled or disabled, immature rewards and rollback.

Review and integration

Current prepared head: b41a94ca3f752650f0f1215a7e763b2cb889cf44. The three maturity-owned files are unchanged from bf06cc62edcfc4480df184184baac5e58638792c.

Shared test increments remain owned by #2535: existing funded fixtures 7c753910, convergence helper H 0f9f75c1, settled-seed/isolation fixture D 71f33c6e, and startup-reader fixture R 76e5ec4b. Production continuation/download correction G d62c945a is owned by #2511; header/body cache wake-up X a772a5cb is owned by #2549. This branch reuses those exact commits and preserves its maturity correction.

Integrate the independently reusable shared increments and their production owners first, then this maturity correction, then #2516. R precedes G; the whole #2535 branch is not a prerequisite of #2511. GitHub's upstream-master diff includes the cumulative prerequisites until they merge.

Validation

The actual #2516 composition with this exact parent passed 133/133 focused cases after normal compilation: 49 synchronization/history/cache cases, 51 registry cases and 33 convergence/isolation cases. This includes the combined maturity and registry-write behavior; it is not a separate execution on this branch or a Docker convergence result. The earlier 68-case wallet scan/registry result is historical evidence for the unchanged owning files.

The same shared liveness corrections also passed full CI in the release composition at 168bd7e16860d3e3a6fbae80a000a4478f19c007 (run 34732895475). That is supporting composition evidence, not exact-head CI for this PR or proof of the exclusive cause of its earlier timeout. Native CI for the updated head is pending.

Historical head bf06cc62 had seven of eight successful checks; integration passed 21/22 and timed out in DeepRollBackSpec (run 34216070115). D now establishes a fully applied, non-mining seed and asserts isolation before the original fork exercise. X and G remain separately owned production prerequisites. Existing convergence assertions, mining targets and deadlines are preserved.

The separate bootstrap join with #2424 must retain its creation-height maturity criterion and pass filtered newly credited outputs to the block digest helper. Snapshot digest callers retain their own inputs; this PR does not validate that whole bootstrap join.

Integration tracker.

Keep synchronization scenarios with their correction in ergoplatform#2511. Reuse the spendable sorting fixture already present in ergoplatform#2480.
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.

1 participant