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

Forward time_travel should create a new transaction #218

Open
sajal opened this issue May 10, 2024 · 4 comments
Open

Forward time_travel should create a new transaction #218

sajal opened this issue May 10, 2024 · 4 comments

Comments

@sajal
Copy link

sajal commented May 10, 2024

Currently all function calls to a contract happen within the scope of a single transaction, however when we time travel to the future using boa.env.time_travel, a new block(or transaction) should be created. I am specifically requesting this because we use transient storage to cache values that are expensive to generate and would be valid through the transaction (the block even), however in the future these values wont be valid specifically because time is a component of these computations(things like amount of yield being generated).

@charles-cooper
Copy link
Member

charles-cooper commented May 10, 2024

from #216 (comment)

@DanielSchiavini
Copy link
Collaborator

Based on #216 I understand the real issue is that we want to clear transient storage when time travelling.
Is that correct? Or is there more data that would need to change?

@charles-cooper
Copy link
Member

i think we should have a function called reset_transaction_context which does whatever we need for resetting transaction context. this includes clearing transient storage and resetting access acounters i think.

@DanielSchiavini
Copy link
Collaborator

@sajal please confirm whether resetting the transient storage is enough for your purposes

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

No branches or pull requests

3 participants