Fix user function complexities - #2128
Merged
alexeykiselev merged 4 commits intoJul 29, 2026
Merged
Conversation
Tests added on estimation and evaluation complexities of this functions.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Ride function complexity catalogue (primarily for user/extracted functions across stdlib versions) and adds regression tests plus Ride source fixtures to validate both estimation and evaluation complexity for selected real-world expressions.
Changes:
- Adjust complexity values for several functions (e.g., data getters /
@extrUser(...)) in the generator catalogue for V3/V4/V9. - Add new estimation/evaluation tests that compile Ride scripts from
pkg/ride/testDataand assert expected complexities. - Add new Ride scripts documenting and exercising the targeted complexity scenarios across STDLIB versions.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/ride/tree_evaluation_test.go | Adds evaluation complexity regression tests for selected Ride scripts. |
| pkg/ride/tree_estimation.go | Minor rename in local variables used to return estimator results. |
| pkg/ride/tree_estimation_test.go | Adds estimation complexity regression tests for selected Ride scripts. |
| pkg/ride/testData/complexity_v3_get_value_by_index.ride | New Ride fixture covering V3 throwing getters (by-index) complexity. |
| pkg/ride/testData/complexity_v4_get_by_index.ride | New Ride fixture covering V4–V8 by-index getter variants complexity. |
| pkg/ride/testData/complexity_v6_address_from_public_key.ride | New Ride fixture covering addressFromPublicKey in V6+. |
| pkg/ride/testData/complexity_v9_get_by_index.ride | New Ride fixture covering V9 by-index getter variants and short-circuiting behavior. |
| pkg/ride/generate/internal/functions_generation.go | Updates generator catalogue values for V3/V4/V9 to match intended complexities. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
nickeskov
approved these changes
Jul 29, 2026
alexeykiselev
merged commit Jul 29, 2026
2816b0f
into
determenistic-finality-feature
12 checks passed
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.
No description provided.