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

MemAfter should be empty for last segment #737

Closed
sai-deng opened this issue Oct 19, 2024 · 1 comment · Fixed by #747
Closed

MemAfter should be empty for last segment #737

sai-deng opened this issue Oct 19, 2024 · 1 comment · Fixed by #747
Assignees

Comments

@sai-deng
Copy link
Contributor

Quoted from @Nashtare in a Slack discussion:

When creating a child context, we do not prune / delete it in case of failure / reversion prior entering this new context. This causes these stale contexts to remain in memory, especially in MemAfter, which is then not empty for the last segment, because next context creation will hop over this past max context id. You can test it easily with block 1033 of the test chain for instance, though several blocks would be triggered on develop (since latest PR, this will panic with wire set twice as the table is expected to be empty, but just looking at the trace lengths will highlight it).

For instance in create_common, for the first txns of this block, we'll be hitting a collision, jumping to %create_collision and reverting to the past checkpoint, but the unused new context will remain (and so will be the associated metadata for largest context ID). We could possibly add some journaling entry for context creations, though this may have some side effects that I haven't foreseen yet, and I'm flying tomorrow morning without my laptop.

@sai-deng
Copy link
Contributor Author

sai-deng commented Oct 28, 2024

#747 should address this issue.

@sai-deng sai-deng moved this from Backlog to In Progress in Zero EVM Oct 28, 2024
@Nashtare Nashtare linked a pull request Nov 4, 2024 that will close this issue
@Nashtare Nashtare added this to the Testing and Validation milestone Nov 4, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Zero EVM Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants