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 config checker logic #138

Merged
merged 7 commits into from
Sep 22, 2024
Merged

Fix config checker logic #138

merged 7 commits into from
Sep 22, 2024

Conversation

samlaf
Copy link
Collaborator

@samlaf samlaf commented Sep 20, 2024

Since we merged the PR that fixed the confDepth=-1 bug, now confDepth is always a non-negative number, so the conf checker is broken. Running make run-memstore-server results in this CRIT:

CRIT [09-19|21:18:50.564] Application failed                       role=eigenda_proxy message="eth confirmation depth is set for certificate verification, but Eth RPC or SvcManagerAddr is not set"

I changed the checks a bit arbitrarily... not super sure if it's correct, @epociask please take a good look. When using the memstore we don't need ethRPC or svsManagerAddr do we?

Tests are failing, waiting for correct semantic before changing them. Also removed the -v from make test because that prints too much garbage and is impossible to find the actual error when a test fails.

one rule was broken due to new semantics of confDepth flag, which can't be negative anymore
server/config.go Outdated
Comment on lines 251 to 261
if cfg.ClientConfig.RPC == "" {
return fmt.Errorf("eigenda disperser rpc url is not set")
}

if cfg.EthRPC != "" && cfg.SvcManagerAddr == "" {
return fmt.Errorf("eth rpc is set, but svc manager address is not set")
}
if cfg.EthRPC == "" {
return fmt.Errorf("eth rpc is not set")
}

if cfg.EthConfirmationDepth >= 0 && (cfg.SvcManagerAddr == "" || cfg.EthRPC == "") {
return fmt.Errorf("eth confirmation depth is set for certificate verification, but Eth RPC or SvcManagerAddr is not set")
if cfg.SvcManagerAddr == "" {
return fmt.Errorf("svc manager address is not set")
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

currently cert verification is an optional feature but this logic makes it mandatory

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a eigenda-cert-verification-enabled flag in 6befa7c
Please make sure the changes make sense.

Copy link
Collaborator

@epociask epociask left a comment

Choose a reason for hiding this comment

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

Let's update the README to reflect this new flag type

@samlaf
Copy link
Collaborator Author

samlaf commented Sep 21, 2024

Let's update the README to reflect this new flag type

Done: ad6094d

Copy link
Collaborator

@epociask epociask left a comment

Choose a reason for hiding this comment

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

LGTM

@samlaf samlaf merged commit 7733fe2 into main Sep 22, 2024
7 checks passed
@samlaf samlaf deleted the fix-config-checker branch September 22, 2024 01:34
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.

2 participants