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

Code hash resolve fix + cleanup #44

Merged
merged 3 commits into from
Feb 16, 2024

Conversation

BGluth
Copy link
Contributor

@BGluth BGluth commented Feb 16, 2024

Although we were adding code that was created during a txn to the local code hash resolve table, it was not getting added to the "global" lookup table. Previously I was using this funny closure to resolve code hashes, but this is pretty
unusable as soon as you need to add new entries to the current table. I ended up replacing this with a struct called CodeHashResolving, which I think is a lot easier to read.

- Although we were adding any contract code created to the local code
  hash resolve table for the current txn, we were not adding this into
  the "global" lookup table.
- Also cleaned up the logic for resolving code hashes.
@BGluth BGluth added bug Something isn't working crate: trace_decoder Anything related to the trace_decoder crate. labels Feb 16, 2024
@BGluth BGluth requested review from dvdplm and Nashtare February 16, 2024 19:34
Copy link
Collaborator

@Nashtare Nashtare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall!

trace_decoder/src/processed_block_trace.rs Outdated Show resolved Hide resolved
trace_decoder/src/processed_block_trace.rs Outdated Show resolved Hide resolved
Co-authored-by: Robin Salen <[email protected]>
@muursh
Copy link
Contributor

muursh commented Feb 16, 2024

Nice job

@BGluth BGluth enabled auto-merge February 16, 2024 21:33
@Nashtare Nashtare disabled auto-merge February 16, 2024 21:35
@Nashtare Nashtare enabled auto-merge (squash) February 16, 2024 21:35
@Nashtare
Copy link
Collaborator

@BGluth Let's maybe only do squash-merges from now, especially as we have all these repos together, to get a straightforward history? (I think this can be enforced in the repo settings by default)

@BGluth
Copy link
Contributor Author

BGluth commented Feb 16, 2024

@Nashtare Yeah I'm fine with that.

@BGluth BGluth disabled auto-merge February 16, 2024 21:38
@BGluth BGluth enabled auto-merge (squash) February 16, 2024 21:39
@Nashtare
Copy link
Collaborator

I had updated the auto-merge 🤣

@BGluth BGluth merged commit d0bc5ec into main Feb 16, 2024
5 checks passed
@BGluth BGluth deleted the code_hash_resolve_for_txn_created_code_fix branch February 16, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crate: trace_decoder Anything related to the trace_decoder crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants