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

[TT-1136, CCIP-2255] make eth node log level configurable via TOML #943

Merged
merged 7 commits into from
May 8, 2024

Conversation

Tofel
Copy link
Contributor

@Tofel Tofel commented May 7, 2024


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes introduce the ability to set and validate node log levels for Ethereum networks within the testing framework, ensuring greater control and flexibility over logging during tests. They also integrate log level configuration into various Ethereum client containers, allowing for dynamic adjustment of verbosity in blockchain simulations.

What

  • config/private_ethereum_network.go

    • Added strings package import for string manipulation.
    • Introduced DefaultNodeLogLevel variable to define a default log level.
    • Added NodeLogLevel field to EthereumNetworkConfig struct to allow configuration of node log level.
    • Updated Validate method to ensure NodeLogLevel is set to a default value if not specified and to validate log level strings.
  • config/tomls/default_ethereum_env.toml

    • Added node_log_level configuration with a default value of "info".
  • docker/test_env/besu_eth1.go & besu_eth2.go

    • Modified container request to configure logging verbosity based on the LogLevel field from the environment configuration.
  • docker/test_env/env_component.go

    • Added LogLevel field to EnvComponent struct to store log level configuration.
    • Introduced WithLogLevel function to configure log level for environment components.
  • docker/test_env/erigon_eth1.go & erigon_eth2.go

    • Adjusted container request and initialization scripts to use the configured log level.
    • For Eth2, added logic to enable trace logging for specified senders if log level is set to trace.
  • docker/test_env/ethereum_env.go

    • Added logic to include log level configuration when building environment components for the execution layer.
  • docker/test_env/ethereum_env_test.go

    • Added tests to verify default log level behavior, trace log level configuration, and validation of invalid log levels.
  • docker/test_env/geth_base.go

    • Introduced logLevelToVerbosity method to convert log level strings to Geth verbosity levels.
  • docker/test_env/geth_eth2.go

    • Updated container request to configure Geth verbosity based on the log level.
  • docker/test_env/nethermind_eth1.go & nethermind_eth2.go

    • Adjusted container request to configure logging based on the LogLevel field.
  • utils/templates/geth.go

    • Removed unused bootnode and non-dev geth initialization scripts.

@Tofel Tofel marked this pull request as ready for review May 7, 2024 16:40
@Tofel Tofel requested review from sebawo and a team as code owners May 7, 2024 16:40
@Tofel Tofel temporarily deployed to integration May 8, 2024 09:33 — with GitHub Actions Inactive
@cl-sonarqube-production
Copy link

@Tofel Tofel merged commit 7ae47c8 into main May 8, 2024
15 of 17 checks passed
@Tofel Tofel deleted the tt_1136_ccip_2255_more_erigon_debug branch May 8, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants