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

[FEAT] Support External Construction of Storage Slot Hashes #97

Closed
4 tasks
iamrecursion opened this issue Sep 22, 2023 · 0 comments · Fixed by #99
Closed
4 tasks

[FEAT] Support External Construction of Storage Slot Hashes #97

iamrecursion opened this issue Sep 22, 2023 · 0 comments · Fixed by #99
Assignees
Labels
enhancement New feature or request

Comments

@iamrecursion
Copy link
Contributor

Description

Currently each run of the analyzer constructs a table of hashes for the first n storage slots as part of the StorageSlotHashes lifting pass. We should instead make it possible to construct those hashes externally and then pass them in during analyzer construction.

Doing it externally also allows us to construct more hashes, as the time it takes only happens once, rather than on a per-run basis.

Spec

  • Add StorageSlotHashes::new_with_hashes(hashes: BiMap<U256, usize>) -> Self.
  • Use this in StorageSlotHashes::new to consolidate behavior.
  • When constructing the inference::Config, construct a custom set of LiftingPasses in the CLI that constructs StorageSlotHashes and passes in (a clone of) the hashes.
  • Provide this new config when constructing and running the analyzer.
@iamrecursion iamrecursion added the enhancement New feature or request label Sep 22, 2023
@2xic 2xic closed this as completed in #99 Sep 28, 2023
2xic added a commit that referenced this issue Sep 28, 2023
# Summary

Adds support for external construction of the storage slot hashes

# Details 
- Adds a new method to `StorageSlotHashes` so it can be constructed with a predefined BitMap of the hashes. 
- Adds a new method to `LiftingPasses` so it can be constructed with a vector of passes 

# Checklist

- [x] Code is formatted by Rustfmt.
- [x] Documentation has been updated if necessary.

Fixes #97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants