light: run detector for sequentially validating light client#5538
light: run detector for sequentially validating light client#5538
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5538 +/- ##
==========================================
+ Coverage 61.11% 61.25% +0.14%
==========================================
Files 262 262
Lines 23685 23686 +1
==========================================
+ Hits 14474 14509 +35
+ Misses 7733 7701 -32
+ Partials 1478 1476 -2
|
There was a problem hiding this comment.
Yes I'm pretty sure this should work albeit potentially a rather costly operation for both the light client and the witness involved. 👍
I notice that we still have this check in place:
// Validate the number of witnesses.
if len(c.witnesses) < 1 && c.verificationMode == skipping {
return nil, errNoWitnesses{}
}
Do we want to extend this to sequential light clients requiring them to also have witnesses or not? Personally I'm leaning towards leaving it as is and not requiring sequential light clients to have witnesses because this is not a default setting and if people are changing the defaults then I'll assume they know what they are doing and also this attack is much more difficult than with skipping.
good eye!
I'm in favor of simplifying the code in general. I will do it. |
Closes #5445