From 54be95a647e1bd32f86151942e684ba6e6c6eb67 Mon Sep 17 00:00:00 2001 From: Ryo Sato Date: Fri, 29 Sep 2023 17:39:51 +0900 Subject: [PATCH] chore: modify pseudocode in SPEC (#29) Signed-off-by: Ryo Sato --- SPEC.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SPEC.md b/SPEC.md index fabc902..69b9b6f 100644 --- a/SPEC.md +++ b/SPEC.md @@ -205,13 +205,13 @@ function verifyHeader( // - The number and block hash are consecutive. // - The timestamp order is correct. // - The difference in gas limit is within the upper limit. - assert(verifyCascadingFields(headers)) + assert(verifyCascadingFields(header.headers)) - assert(verifySeals(headers, currentValidators, previousValidators)) + assert(verifySeals(header.headers, header.currentValidators, header.previousValidators)) // verifies the header adheres to the BEP126 finality rule. // Ref. https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP126.md#413-finality-rules - assert(verifyFinalized(headers, currentValidators, previousValidators)) + assert(verifyFinalized(header.headers, header.currentValidators, header.previousValidators)) } function verifySeals( @@ -241,7 +241,7 @@ Primary verification according to BEP-126's finality rule involves: - The `source` of the direct grandchild header should match the submitted header. - The `target` of the direct grandchild header should match the direct child header. -However, there may be cases where the VoteAttestation cannot directly determin the finality of the submitted header. +However, there may be cases where the VoteAttestation cannot directly determine the finality of the submitted header. In such cases, a valid descendant header is verified, which is included in the `headers` and can directly confirm its finality through VoteAttestation. ## Misbehavior predicate