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

fix: fixes broken logging and adds structure to logs #411

Merged
merged 17 commits into from
Dec 3, 2024

Conversation

dutterbutter
Copy link
Collaborator

@dutterbutter dutterbutter commented Nov 22, 2024

This is one step towards an improved debugging experience.

What 💻

  • --show-storage-logs, --show-vm-details, and --show-gas-details CLI options added back
  • Modified -d to be user focused
  • Adds --show-event-logs so they too can be configurable
  • Adds Formatter impl to manage structured logs
  • Updates transaction summary
  • Reformatted and updated the address map with new entries and corrected existing ones for system contracts and precompiles.
  • Added system contracts fn and events to openchain for decoding

Why ✋

  • Helpful for debugging, were previously broken
  • Enhances logged structure for improved debugging experience :)

Usage

  • Remove .cache: rm -rf .cache

For ALL calls (can also specify just user):
./target/release/era_test_node --show-calls=all --resolve-hashes=true run

  • if you want to see the output from those calls include --show-outputs=true

For events:
./target/release/era_test_node --show-event-logs=true --resolve-hashes=true run

For gas:
./target/release/era_test_node --show-gas-details=all run

For Storage logs (Write view)
./target/release/era_test_node --show-storage-logs=write run

Evidence 📷

Include screenshots, screen recordings, or console output here demonstrating that your changes work as intended

Before ALL call stack:
Screenshot 2024-11-20 at 10 30 42 PM

Improved All Call Stack Log:
Screenshot 2024-11-22 at 1 41 25 PM

Events:
Screenshot 2024-11-23 at 4 49 55 PM

Gas Details LOTS of improvement can be done here!
Screenshot 2024-11-22 at 1 42 56 PM

VM Execution details
Screenshot 2024-11-22 at 1 43 16 PM

Write Storage Logs
Screenshot 2024-11-22 at 1 44 21 PM

@dutterbutter dutterbutter marked this pull request as ready for review November 22, 2024 21:58
@dutterbutter dutterbutter requested a review from a team as a code owner November 22, 2024 21:58
@dutterbutter dutterbutter force-pushed the db/fix-and-improve-debugging-logs branch from 15b01bc to 6a5c7af Compare November 23, 2024 17:16
@popzxc popzxc requested a review from itegulov November 25, 2024 07:03
@dutterbutter dutterbutter added the needs review 👓 PR requires a review label Nov 25, 2024
@dutterbutter dutterbutter force-pushed the db/fix-and-improve-debugging-logs branch from 903eaae to aa7c660 Compare November 28, 2024 20:55
@dutterbutter dutterbutter force-pushed the db/fix-and-improve-debugging-logs branch from aa7c660 to ddd0239 Compare November 29, 2024 17:02
@dutterbutter
Copy link
Collaborator Author

@Romsters please review at your convenience

Romsters
Romsters previously approved these changes Dec 3, 2024
@dutterbutter dutterbutter merged commit f3e58cd into main Dec 3, 2024
13 checks passed
@dutterbutter dutterbutter deleted the db/fix-and-improve-debugging-logs branch December 3, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review 👓 PR requires a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants