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

Predicate validation using the VM within the SDK #1195

Open
digorithm opened this issue Nov 8, 2023 · 1 comment
Open

Predicate validation using the VM within the SDK #1195

digorithm opened this issue Nov 8, 2023 · 1 comment
Assignees

Comments

@digorithm
Copy link
Member

Similar to dry runs.

@iqdecay
Copy link
Contributor

iqdecay commented Feb 27, 2024

  • The changes proposed in feat: add a method to validate predicate transfers #1283 were actually not the ones needed.
  • The point of doing predicates validation within the SDK, using the VM code, is to avoid having to do network calls (via dry-runs) to the node to validate predicates. This is with the idea that we are currently relying too much on the node for doing simple operations (estimations), thus putting extra and most likely superfluous computing power pressure on the node.
  • The predicate validation should not only consider the predicate data (ie if the predicate returns true with the data it receives), but all of the elements that concur to the validation (or not) of the predicate. That implies correct gas estimation, the predicate or wallet having the necessary funds, inputs/outputs being set correctly, and possibly other conditions.
  • This means that possibly there could be contract instructions needed to validate the predicate. In that case the VM within the SDK would maybe need to fetch some contract data from the node.

@Br1ght0ne Br1ght0ne removed their assignment Feb 27, 2024
hal3e added a commit that referenced this issue Mar 19, 2024
…#1286)

This PR normally closes (correctly this time I hope) #1195 by adding
predicates
validation within the SDK.
- This means that now the SDK can detect if an invalid predicate
transaction is
  about to be sent to the node and prevents it.

---------

Co-authored-by: Rodrigo Araújo <rod.dearaujo@gmail.com>
Co-authored-by: MujkicA <32431923+MujkicA@users.noreply.github.com>
Co-authored-by: hal3e <git@hal3e.io>
Co-authored-by: Ahmed Sagdati <37515857+segfault-magnet@users.noreply.github.com>
@Salka1988 Salka1988 removed their assignment Apr 30, 2024
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 a pull request may close this issue.

4 participants