-
Notifications
You must be signed in to change notification settings - Fork 16
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
Documentation for trusted method analysis #320
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall good with small comments. I overall think this can also benefit from an example; I believe we will make one in the Examples
repo, and I think we should link to it after it's been merged there.
potentially untrusted. | ||
|
||
I.e. a method call is trusted iff at the call site: | ||
1. the target contract address is resolvable and is known to be a fixed address (along all possible execution path) _and_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. the target contract address is resolvable and is known to be a fixed address (along all possible execution path) _and_ | |
1. the target contract address is resolvable and is known to be a fixed address (along all possible execution paths) _and_ |
|
||
I.e. a method call is trusted iff at the call site: | ||
1. the target contract address is resolvable and is known to be a fixed address (along all possible execution path) _and_ | ||
2. the method sighash is resolvable and is known to be fixed (also along all possible execution path) _and_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. the method sighash is resolvable and is known to be fixed (also along all possible execution path) _and_ | |
2. the method sighash is resolvable and is known to be fixed (also along all possible execution paths) _and_ |
"prover_resource_files": ["trustedMethods:ExampleTrustedMethod.json"], | ||
``` | ||
|
||
3. Create a file called `ExampleTrustedMethod.json` in the folder you are executing `certoraRun` command from. Within the file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Create a file called `ExampleTrustedMethod.json` in the folder you are executing `certoraRun` command from. Within the file | |
3. Create a file called `ExampleTrustedMethod.json` in the folder from which you are executing the `certoraRun` command. Within the file |
"0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed": ["0x7e2a6db8","0xb23d4266"] | ||
} | ||
``` | ||
Here `["0x7e2a6db8","0xb23d4266"]` is the list of methods with signatures `["trusted()","untrusted()"]`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit weird to use the function untrusted()
as an example of a trusted command, maybe better to use a different name
This PR adds documentation for a new built in rule to detect trusted and untrusted methods.