-
Notifications
You must be signed in to change notification settings - Fork 224
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
Light client conformance tests differences between description and real errors #290
Comments
@ebuchman I'll continue adding differences between errors we would expect based on the description and the ones which are currently registered in this issue. |
|
I'm looking into this now |
So as @OStevan explained, there were errors in
Well, description in tests explain "where" the error should be instead of "what". Specifying the error type could be tricky here because the above cases are essentially all about detecting differences in header and commit. So for the same error, you could say it's an invalid header. As long as it fails for the expected reason, I wouldn't care much about the error type. |
@Shivani912 thanks for following up on this.
I'll just explain my reasoning why I mentioned this. I considered this as an issue because the current implementation passes tests because header hash check catches the differences. Therefore someone could easily delete those height checks, etc. in the code without failing any of those tests and then someone could make artificial light blocks which would pass the validation. Also it seems a bit wasteful to compute the hash for the whole block while there is only an error in height values. |
Thanks for explaining further @OStevan but I still don't understand what you mean by deleting checks and and validating artificial light blocks 🤔 I do agree it'll be useful to have less expensive checks for fields like |
When running tests for light client I noticed that for
not_enough_commits
(in the current canonical implementation) andinvalid_validator_set
(the new one inlight-client
) the expected error based on the description is not the same as the error we get when the test is run.not_enough_commits
: fails withInvalidNextValidatorSet
for height 5 instead ofInsufficientCommitPower
for height 6invalid_validator_set
: fails withrequest for height 6
instead of invalidInvalidNextValidatorSet
for height 11The text was updated successfully, but these errors were encountered: