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

Add ETH dump #1373

Merged
merged 2 commits into from
Apr 5, 2024
Merged

Add ETH dump #1373

merged 2 commits into from
Apr 5, 2024

Conversation

boyuan-chen
Copy link
Contributor

📋 Add associated issues, tickets, docs URL here.

Overview

Describe what your Pull Request is about in a few sentences.

Add ethdump

Changes

Describe your changes and implementation choices. More details make PRs easier to review.

  • Add ethdump function when we change the ETH balance and mint ETH on L2

Testing

Describe how to test your new feature/bug fix and if possible, a step by step guide on how to demo this.

The unit test is added

if err != nil {
panic(err)
}
err = os.WriteFile(os.Getenv("L2GETH_ETH_DUMP_PATH"), content, 0644)
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this is overwriting the entire file each time a new address is seen. That seems inefficient, but I suppose it doesn't matter if the total dataset is small enough. I'll approve the overall PR, but if you do see performance issues then consider appending to a file one address at a time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, if we change how the file is written, we'll need to make some changes in boba-chain-ops.

Copy link

@jyellick jyellick left a comment

Choose a reason for hiding this comment

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

Agreed with respect to some of the concerns around rewriting this JSON file each time, but as a one off, if it works, great.

@boyuan-chen boyuan-chen merged commit 06c9f2c into develop Apr 5, 2024
5 of 15 checks passed
@boyuan-chen boyuan-chen deleted the add-eth-dump branch April 5, 2024 19:26
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.

3 participants