Merge pull request #6443 from IntersectMBO/fix/legacy-tracing-metric-names
legacy tracing: fix mempool timeout metric names
legacy tracing: fix mempool timeout metric names
Signed-off-by: Chris Gianelloni <[email protected]>
Add benchOneTextString4Byte for EncodeUtf8: generates strings using only 4-byte UTF-8 characters (U+10000..U+10FFFF) with char-count x-axis. For these inputs, ceil(bytes/4) = char_count exactly, so fitting with denominator 4 should produce parameters matching the char-count model. Adjust size ranges to match master's effective range (which was doubled by the old 2*n generator bug): oneArgumentSizes: [0,100..10000] -> [0,200..20000] (101 points) twoArgumentSizes: [0,250..5000] -> [0,500..10000] (21 points)
- DRep guide: fix CIP-129 rules from #683 (`type` inferred for prefixed ids, required for raw ids), keep 3 examples, and reorganize sections. - Staking guide: add explicit prerequisite that reward withdrawal requires active DRep delegation. - Pool operations guide: add per-operation required metadata and fix governance vote wording/section naming. - Env vars guide: sync documented defaults with v2.1.0 values.
Signed-off-by: Yurii Shynbuiev <[email protected]>
Document why VBuiltin terms don't need global shifting during discharge, and note the unchecked Word64 overflow in shiftNamedDeBruijn.
Replace the two-pass dischargeCekValue implementation (discharge + shiftTermBy post-pass) with a single-pass approach that threads a global shift parameter through goValue/goValEnv. This avoids a separate traversal for shifting and handles truly free variables (not found in the environment) consistently. - Add shiftNamedDeBruijn utility to PlutusCore.DeBruijn - Thread `global` shift parameter through goValue and goValEnv - Delete the standalone shiftTermBy function - Add 4 new tests for truly free vars past non-empty environments
VBuiltin values can be stored in an environment and later discharged under additional binders. The previous code returned VBuiltin terms without shifting, causing variable capture. Add shiftTerm helper to shift free variables in discharged VBuiltin terms, add bang pattern to shiftNamedDeBruijn for consistency, and add a VBuiltin test case reproducing basetunnel's example from issue #7526.
Add shift==idx boundary test verifying bound variable detection, and VConstr test verifying free variables in constructor arguments are shifted correctly under lambdas.
Document the variable capture bug fix in the changelog.
Add 8 test cases covering variable capture scenarios in dischargeCekValue: - Free variables under 1, 2, and 3 lambdas - Deeply indexed free variables - Multiple free variables in the same term - Nested environment structures Tests verify that free variables are correctly shifted to prevent capture when terms are discharged from the evaluation environment. Tests for #7526
Add shiftTermBy function to correctly shift free variables when discharging values from the environment. Previously, free variables in discharged terms could be captured by outer lambdas, causing incorrect variable references in the output term. The fix tracks binding depth during discharge and shifts free variables (those with indices beyond the current binding depth) by the appropriate amount to maintain correct scoping. Resolves #7526
Signed-off-by: Jacob Finkelman <[email protected]>