Skip to content

Fix user function complexities - #2128

Merged
alexeykiselev merged 4 commits into
determenistic-finality-featurefrom
fix-user-function-complexities
Jul 29, 2026
Merged

Fix user function complexities#2128
alexeykiselev merged 4 commits into
determenistic-finality-featurefrom
fix-user-function-complexities

Conversation

@alexeykiselev

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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/testData and 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.

Comment thread pkg/ride/tree_evaluation_test.go
Comment thread pkg/ride/tree_estimation_test.go
Comment thread pkg/ride/testData/complexity_v9_get_by_index.ride Outdated
Comment thread pkg/ride/testData/complexity_v6_address_from_public_key.ride Outdated
@nickeskov
nickeskov deployed to Deploy-testnet-amd64 July 8, 2026 09:48 — with GitHub Actions Active
@alexeykiselev
alexeykiselev merged commit 2816b0f into determenistic-finality-feature Jul 29, 2026
12 checks passed
@alexeykiselev
alexeykiselev deleted the fix-user-function-complexities branch July 29, 2026 14:04
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.

3 participants