mirror of
https://github.com/tendermint/tendermint.git
synced 2026-10-01 04:05:45 +00:00
lite2: use bisection for some of backward verification (#4575)
Closes: #4537 Uses SignedHeaderBefore to find header before unverified header and then bisection to verify the header. Only when header is between first and last trusted header height else if before the first trusted header height then regular backwards verification is used.
This commit is contained in:
@@ -60,8 +60,9 @@ also cross-checked with witnesses for additional security.
|
||||
|
||||
Due to bisection algorithm nature, some headers might be skipped. If the light
|
||||
client does not have a header for height `X` and `VerifyHeaderAtHeight(X)` or
|
||||
`VerifyHeader(H#X)` methods are called, it will perform a backwards
|
||||
verification from the latest header back to the header at height `X`.
|
||||
`VerifyHeader(H#X)` methods are called, these will perform either a) backwards
|
||||
verification from the latest header back to the header at height `X` or b)
|
||||
bisection verification from the first stored header to the header at height `X`.
|
||||
|
||||
`TrustedHeader`, `TrustedValidatorSet` only communicate with the trusted store.
|
||||
If some header is not there, an error will be returned indicating that
|
||||
|
||||
Reference in New Issue
Block a user