Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

add_visited_pcs should not be part of State trait #1683

Open
tdelabro opened this issue Mar 18, 2024 · 0 comments
Open

add_visited_pcs should not be part of State trait #1683

tdelabro opened this issue Mar 18, 2024 · 0 comments

Comments

@tdelabro
Copy link
Contributor

/// Marks the given set of PC values as visited for the given class hash.
// TODO(lior): Once we have a BlockResources object, move this logic there. Make sure reverted
// entry points do not affect the final set of PCs.
fn add_visited_pcs(&mut self, class_hash: ClassHash, pcs: &HashSet<usize>);

As explained in the comment this method should not be part of the State trait.
It makes it weird to implement for any user of the lib. They now have to mirror your architecture otherwise they can't correctly impl the trait.

Can you please remove it from State and put it in another trait that may, or may not be implemented by the same structure?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant