Add budget consistency test (VariantC, 55 builtins)#7663
Draft
Add budget consistency test (VariantC, 55 builtins)#7663
Conversation
…ariantB) Compare three evaluation paths (direct, benchmark, production) for both VariantC (V3) and VariantB (V2). For each variant, compare CostModelParams maps key-by-key in addition to ExBudget totals. VariantB reveals a structural discrepancy: Path A/B has 332 params (full cost model) while Path C has 206 params (V3-only builtins cleared). All 206 shared params have identical values and budgets match for V2 terms.
f6d33d7 to
76b675a
Compare
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.
Summary
ExBudgetfor a single "kitchen sink" UPLC term exercising 55 builtins available at changPV (PV9, batch 1–4)defaultCekParametersForVariant), benchmark (mkDynEvaluationContext), and production (V3.mkEvaluationContextwith[Int64])Context
Addresses the concern from https://github.com/IntersectMBO/plutus-private/issues/2084 that different cost model construction paths might produce divergent budgets.
Builtin coverage
Not covered: BLS12_381 (need group elements), signature verification (need valid sigs), batch 5-6 (not available at changPV).
Test results
All three paths agree:
ExBudget {exBudgetCPU = ExCPU 19495026, exBudgetMemory = ExMemory 37516}Test plan
cabal test plutus-ledger-api-test --test-option="-p" --test-option="/Budget consistency/"— all 5 tests pass