Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: mark unconstrained methods of runtime BN as unconstrained #140

Closed
wants to merge 1 commit into from

Conversation

kashbrti
Copy link
Contributor

@kashbrti kashbrti commented Feb 25, 2025

resolves #133
this might be a breaking change because the unconstrained methods might have been used
outside unsafe blocks before (they were in the test module).

Description

Problem*

Resolves

Summary*

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@kashbrti kashbrti marked this pull request as ready for review February 25, 2025 14:24
@TomAFrench
Copy link
Member

Hey, I closed #133 as there's actually a reason for why these methods are not marked as unconstrained

// They're not actually decorated as `unconstrained` because to return the `params` (as part of Self) from an `unconstrained` fn would cause range constraints. Instead, each `__` fn wraps a call to an unconstrained fn, so that the already-range-constrained `params` can be inserted into Self after the unconstrained call.

Can you update the doc comments to direct the developer to read the documentation attached to the RuntimeBigNum struct type and include the justification in a doc comment there?

@kashbrti
Copy link
Contributor Author

closing this following the discussion made on the issue.

@kashbrti kashbrti closed this Feb 25, 2025
@kashbrti kashbrti deleted the kb/runtime_bn_unconstrained branch February 25, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Mark unconstrained methods on RuntimeBigNum as unconstrained
2 participants