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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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

@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.

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.

2 participants