Skip to content

New cost model - #1502

Merged
arvidn merged 3 commits into
mainfrom
new-cost-model
Aug 6, 2026
Merged

New cost model#1502
arvidn merged 3 commits into
mainfrom
new-cost-model

Conversation

@arvidn

@arvidn arvidn commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

High Risk
Consensus and CLVM cost/limit behavior change at defined heights; incorrect flag gating would diverge from network rules and affect block/spend validation.

Overview
Bumps clvmr / clvm-fuzzing to 0.19.0 and wires two new dialect flags—LIMITS and NEW_COST_MODEL—through ConsensusFlags and the from_clvm_flags / to_clvm_flags conversions so Python and Rust stay bit-aligned with clvmr.

Height-gated behavior in get_flags_for_height_and_constants changes: NEW_COST_MODEL turns on with hard fork 2 alongside the existing HF2 bundle. Soft fork 8’s DISABLE_OP and LIMITS are now applied only in the else if branch (after soft fork 8 but before hard fork 2), so those transitional rules stop once HF2 activates.

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

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​clvmr@​0.18.0 ⏵ 0.19.097100100100100
Updatedcargo/​clvm-fuzzing@​0.18.0 ⏵ 0.19.099100100100100

View full report

@coveralls-official

Copy link
Copy Markdown

Coverage Report for CI Build 31037445434

Coverage increased (+0.8%) to 82.676%

Details

  • Coverage increased (+0.8%) from the base build.
  • Patch coverage: 4 uncovered changes across 1 file (13 of 17 lines covered, 76.47%).
  • 2 coverage regressions across 1 file.

Uncovered Changes

File Changed Covered %
crates/chia-consensus/src/spendbundle_validation.rs 5 1 20.0%
Total (2 files) 17 13 76.47%

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
crates/chia-consensus/src/spendbundle_validation.rs 2 94.31%

Coverage Stats

Coverage Status
Relevant Lines: 19851
Covered Lines: 16412
Line Coverage: 82.68%
Coverage Strength: 11149570.78 hits per line

💛 - Coveralls

@arvidn

arvidn commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@arvidn
arvidn requested a review from AmineKhaldi August 5, 2026 21:51

@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 ddefb84. Configure here.

@arvidn
arvidn merged commit 6cceddf into main Aug 6, 2026
83 checks passed
@arvidn
arvidn deleted the new-cost-model branch August 6, 2026 10:09
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