-
Notifications
You must be signed in to change notification settings - Fork 34
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
Conversation
one rule was broken due to new semantics of confDepth flag, which can't be negative anymore
server/config.go
Outdated
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") | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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
Done: ad6094d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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. Runningmake run-memstore-server
results in this CRIT: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.