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

Liav/cert 7804 trusted methods #149

Merged
merged 5 commits into from
Jan 6, 2025

Conversation

liav-certora
Copy link
Contributor

No description provided.

Copy link
Contributor

@nd-certora nd-certora left a comment

Choose a reason for hiding this comment

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

left some comments that are nice to have but not mandatory


Run this example using:
```certoraRun Example.conf```
[A report of this run](https://vaas-stg.certora.com/output/15800/7329f2dcf86c49f6b96891439eeaa467?anonymousKey=cde57e9e5f2ab7c5300399cdaa97585add830664)
Copy link
Contributor

Choose a reason for hiding this comment

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

give a link to prover.cerotra.com

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

Foo bar = Foo(userTrustedContractAddress);
return bar.trusted();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

can we show more complicated examples? I'm not sure what will happen when the resolution is via spec/smt:

for example: 1. passing the target as a parameter and having a dispatcher:
2. an unresolved call the we have a in the spec "unresolved call"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll try to play with this a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I tried some things but I probably didn't fully understand you.
I mainly tried to add an example for a function that will call an arbitrary function on Foo and then have a dispatch list such that any unresolved calls in that function will go to Foo.trusted() and this was the result.
If that's important it would be helpful if you could elaborate a little bit about what you meant please :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@johspaeth you might be able to help here 😬

Copy link
Contributor

Choose a reason for hiding this comment

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

Using a dispatcher is currently not expected to work here, the check is implemented as a built-in rule and these don't apply the CVL summaries at all. (Exactly as use builtin rule sanity;)

The current use case we have is actually for byte code analysis to have a simple analysis that detects method calls that are to unknown target / unknown sighashes. If we have more use cases, we can change the logic and allow CVL summarization etc, for now I don't see this critical though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the clarification @johspaeth 🙏

@liav-certora liav-certora merged commit 8eee16d into cli-beta Jan 6, 2025
@liav-certora liav-certora deleted the liav/cert-7804-trusted-methods branch January 6, 2025 12:33
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.

4 participants