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

app/stacksnipe: detect validator services #3169

Merged
merged 2 commits into from
Jul 25, 2024
Merged

Conversation

gsora
Copy link
Collaborator

@gsora gsora commented Jul 11, 2024

Detect Ethereum validator stack components by reading /proc and filtering processes based on an allowlist.

To support containerized deployments, add --proc-directory flag to charon run: if not configured, Charon will log an INFO message saying it won't do anything.

Support detecting interpreted components like lodestar.

Expose the resulting data through the app_validator_stack_params Prometheus metric.

By default, poll the specified directory every 15 seconds.

category: feature
ticket: none

Detect Ethereum validator stack components by reading `/proc` and filtering processes based on an allowlist.

To support containerized deployments, add `--proc-directory` flag to `charon run`: if not configured, Charon will log an `INFO` message saying it won't do anything.

Support detecting interpreted components like `lodestar`.

Expose the resulting data through the `app_validator_stack_params` Prometheus metric.

By default, poll the specified directory every 15 seconds.
Copy link

sonarcloud bot commented Jul 12, 2024

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 63.30935% with 51 lines in your changes missing coverage. Please review.

Project coverage is 56.70%. Comparing base (3b2f598) to head (3e5bc4a).
Report is 2 commits behind head on main.

Files Patch % Lines
app/stacksnipe/stacksnipe.go 67.44% 31 Missing and 11 partials ⚠️
app/monitoringapi.go 0.00% 6 Missing ⚠️
app/app.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3169      +/-   ##
==========================================
- Coverage   56.78%   56.70%   -0.08%     
==========================================
  Files         208      209       +1     
  Lines       29221    29374     +153     
==========================================
+ Hits        16592    16656      +64     
- Misses      10802    10877      +75     
- Partials     1827     1841      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@pinebit pinebit left a comment

Choose a reason for hiding this comment

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

Provided a few minor comments

app/stacksnipe/stacksnipe.go Show resolved Hide resolved
app/stacksnipe/stacksnipe.go Show resolved Hide resolved
app/stacksnipe/stacksnipe.go Show resolved Hide resolved
Copy link
Contributor

@pinebit pinebit left a comment

Choose a reason for hiding this comment

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

This must be great feature!

@@ -91,6 +91,7 @@ func bindRunFlags(cmd *cobra.Command, config *app.Config) {
cmd.Flags().Uint64Var(&config.TestnetConfig.ChainID, "testnet-chain-id", 0, "Chain ID of the custom test network.")
cmd.Flags().Int64Var(&config.TestnetConfig.GenesisTimestamp, "testnet-genesis-timestamp", 0, "Genesis timestamp of the custom test network.")
cmd.Flags().StringVar(&config.TestnetConfig.CapellaHardFork, "testnet-capella-hard-fork", "", "Capella hard fork version of the custom test network.")
cmd.Flags().StringVar(&config.ProcDirectory, "proc-directory", "", "Directory to look into in order to detect other stack components running on the host.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably we can add an example of such dir?

@gsora gsora added the merge when ready Indicates bulldozer bot may merge when all checks pass label Jul 25, 2024
@obol-bulldozer obol-bulldozer bot merged commit 34f7d83 into main Jul 25, 2024
12 checks passed
@obol-bulldozer obol-bulldozer bot deleted the gsora/stacksnipe branch July 25, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants