Skip to content

Per spend counters - #1510

Merged
arvidn merged 2 commits into
mainfrom
per-spend-counters
Aug 25, 2026
Merged

Per spend counters#1510
arvidn merged 2 commits into
mainfrom
per-spend-counters

Conversation

@arvidn

@arvidn arvidn commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

expose atoms and pairs counters per-spend


Note

Low Risk
Additive observability fields on spend metadata with no change to validation rules or consensus behavior; main risk is API breakage for direct callers of SpendConditions::new / process_single_spend.

Overview
Adds atom_count and pair_count on each spend’s condition metadata so callers can see how many allocator atoms/pairs that spend’s puzzle run created.

Spend bundle validation, block generator processing, and fast-forward paths now snapshot the allocator before/after run_program, compute the delta, and thread those values through SpendConditions::new / process_single_spend. The owned/Python-facing OwnedSpendConditions mirror the same fields; fuzz targets, unit tests, and generator test output are updated for the new constructor arguments (paths that don’t execute CLVM pass 0).

Reviewed by Cursor Bugbot for commit 368d67a. Bugbot is set up for automated code reviews on this repo. Configure here.

@arvidn

arvidn commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 368d67a. Configure here.

@coveralls-official

Copy link
Copy Markdown

Coverage Report for CI Build 32773999990

Coverage increased (+0.03%) to 82.012%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: 35 of 35 lines across 6 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 20086
Covered Lines: 16473
Line Coverage: 82.01%
Coverage Strength: 11553621.65 hits per line

💛 - Coveralls

@arvidn
arvidn requested a review from AmineKhaldi August 25, 2026 08:42
@arvidn
arvidn merged commit 47b3c19 into main Aug 25, 2026
85 checks passed
@arvidn
arvidn deleted the per-spend-counters branch August 25, 2026 10:38
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.

2 participants