Skip to content

Conversation

@JonathanOppenheimer
Copy link
Member

@JonathanOppenheimer JonathanOppenheimer commented Dec 31, 2025

Why this should be merged

Closes #4776 -- this is a pretty nice clean up IMO. Credit to Maru for raising the issue.

How this works

One thing to note that is that embed declaration only work for files at the same level directory. See golang/go#46056. So I created a single file to embed the shared genesis file and then imported it.

How this was tested

CI

Need to be documented in RELEASES.md?

No

@JonathanOppenheimer JonathanOppenheimer self-assigned this Dec 31, 2025
@JonathanOppenheimer JonathanOppenheimer requested a review from a team as a code owner December 31, 2025 17:07
@JonathanOppenheimer JonathanOppenheimer added cleanup Code quality improvement evm Related to EVM functionality labels Dec 31, 2025
genesisPath := filepath.Join(testDir, "genesis.json")

var err error
repoRoot, err = e2e.GetRepoRootPath("tests/load")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm ok with continuing to use GetRepoRootPath for now, but ideally we remove the need for it going forward (i.e. by checking for the run_simulator.sh script via a relative path and if missing require an absolute path to be provided by a flag).

Copy link
Member Author

Choose a reason for hiding this comment

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

I will do a follow up PR to accomplish this! and remove the function entirely so no one else can use it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Here is the PR #4813

@maru-ava maru-ava enabled auto-merge January 6, 2026 15:51
@maru-ava maru-ava added this pull request to the merge queue Jan 6, 2026
Merged via the queue into master with commit 61635ac Jan 6, 2026
53 checks passed
@maru-ava maru-ava deleted the JonathanOppenheimer/avoid-runtime-caller branch January 6, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code quality improvement evm Related to EVM functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid using runtime.caller throughout the EVM codebase to get file paths

5 participants