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

More symbolic overapproximation when the remote contract cannot be fetched, adding CodeHash SMT representation #673

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

msooseth
Copy link
Collaborator

@msooseth msooseth commented Mar 3, 2025

Description

This allows us to overapproximate when the contract is real, but cannot be fetched. Meant to be on top of #658 i.e. symbolic-extcodesize. It allows us to overapproximate also when the contract cannot be fetched with RPC for opcodes:

  • Balance
  • CodeHash

I also added CodeHash SMT representation so concrete addresses that cannot be fetched can be abstracted away and e.g. equivalence-checked. Tests have been added that exercise this very functionality.

See opcodes for reference:

Debug code has also been added to show when the system is trying to fetch data via RPC. This helps in e.g. debugging. We probably at one point want to collect this data, which would allow us to fully and correctly replay things in tests. But that's a bit far away...

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog
Rate limit · GitHub

Whoa there!

You have triggered an abuse detection mechanism.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

@msooseth msooseth changed the title More symbolic overapproximation when the remote contract cannot be fetched [DRAFT] More symbolic overapproximation when the remote contract cannot be fetched Mar 3, 2025
@msooseth msooseth force-pushed the more-symbolic branch 2 times, most recently from f791dcd to dfcaa41 Compare March 4, 2025 13:02
@msooseth msooseth changed the title [DRAFT] More symbolic overapproximation when the remote contract cannot be fetched [DRAFT] More symbolic overapproximation when the remote contract cannot be fetched, adding CodeHash SMT representation Mar 4, 2025
@msooseth msooseth force-pushed the more-symbolic branch 3 times, most recently from 65e277b to 21268bd Compare March 4, 2025 14:44
Fixing changelog

Better debug

Fixing build

Fixing build

Fixing
@msooseth msooseth requested a review from blishko March 5, 2025 16:56
@msooseth msooseth changed the title [DRAFT] More symbolic overapproximation when the remote contract cannot be fetched, adding CodeHash SMT representation More symbolic overapproximation when the remote contract cannot be fetched, adding CodeHash SMT representation Mar 5, 2025
@msooseth msooseth marked this pull request as ready for review March 5, 2025 16:56
Copy link
Collaborator

@blishko blishko left a comment

Choose a reason for hiding this comment

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

Looks OK to me, though again, I still lack the knowledge to understand the fallbacks.

@msooseth
Copy link
Collaborator Author

@blishko thanks for the review! @ggrieco-tob has kindly reviewed the EVM part of it, and it seems sane to him, so I'm merging :)

@msooseth msooseth merged commit 27aefc5 into main Mar 11, 2025
9 checks passed
@msooseth msooseth deleted the more-symbolic branch March 11, 2025 14:54
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.

None yet

2 participants