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: add data and into_data #825

Closed
wants to merge 1 commit into from

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Oct 21, 2023

adds back previous Memory data functions:

https://github.com/bluealloy/revm/pull/516/files

I don't fully understand if this is correct. idk what a context is or how the shared memory is laid out.

In reth inspectors we need to get the currently active memory, and I'm not sure this is still accurate:

https://github.com/paradigmxyz/reth/blob/9dd270e4e8095a4cab1d2118f8f965eec68f4db7/crates/revm/revm-inspectors/src/tracing/types.rs#L536-L537

@rakita
Copy link
Member

rakita commented Oct 23, 2023

This is not okay. .context_memory() should be used to fetch current call memory frame

@rakita rakita closed this Oct 23, 2023
@mattsse
Copy link
Collaborator Author

mattsse commented Oct 23, 2023

but this is exactly what this did?

and context_memory is private

@rakita
Copy link
Member

rakita commented Oct 23, 2023

but this is exactly what this did?

and context_memory is private

I didn't see that context_memory is not public, it should be.

into_data would still copy the context_memory with split_off, and using into_data for consuming shared memory for its last context and disregarding previous ones could introduce footguns.

@mattsse
Copy link
Collaborator Author

mattsse commented Oct 23, 2023

into_data would still copy the context_memory with split_off, and using into_data for consuming shared memory for its last context and disregarding previous ones could introduce footguns.

I see, yeah, makes sense, we need to clone that during tracing anyway,
will open another pr that makes context_memory pub then

@rakita rakita reopened this Oct 23, 2023
@rakita
Copy link
Member

rakita commented Oct 23, 2023

into_data would still copy the context_memory with split_off, and using into_data for consuming shared memory for its last context and disregarding previous ones could introduce footguns.

I see, yeah, makes sense, we need to clone that during tracing anyway, will open another pr that makes context_memory pub then

Sorry if i closed this abruptly, you can make the change here or a new PR sounds okay.

@mattsse
Copy link
Collaborator Author

mattsse commented Oct 23, 2023

closing in favor of #831

@mattsse mattsse closed this Oct 23, 2023
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