From 24f22eeb52e651c6e96dccfbc86cc881772f2de8 Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Fri, 16 Jul 2021 12:49:15 +0200 Subject: [PATCH] address discrepancies between spec and implementation (#322) --- spec/light-client/detection/detection_003_reviewed.md | 8 ++++++++ .../verification/verification_001_published.md | 2 -- spec/light-client/verification/verification_002_draft.md | 2 -- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/spec/light-client/detection/detection_003_reviewed.md b/spec/light-client/detection/detection_003_reviewed.md index 812f80d1c..13f6e9716 100644 --- a/spec/light-client/detection/detection_003_reviewed.md +++ b/spec/light-client/detection/detection_003_reviewed.md @@ -457,6 +457,10 @@ we refer to a variable of the following type type LightClientAttackEvidence struct { ConflictingBlock LightBlock CommonHeight int64 + + // Evidence also includes application specific data which is not + // part of verification but is sent to the application once the + // evidence gets committed on chain. } ``` @@ -698,6 +702,10 @@ func CreateEvidenceForPeer(peer PeerID, root LightBlock, trace LightStore) // we can create evidence for submission to the secondary ev := new InternalEvidence; ev.Evidence.ConflictingBlock := trace[i]; + // CommonHeight is used to indicate the type of attack + // if the CommonHeight != ConflictingBlock.Height this + // is by definition a lunatic attack else it is an + // equivocation attack ev.Evidence.CommonHeight := common.Height; ev.Peer := peer return (ev, common, auxLS, FoundEvidence) diff --git a/spec/light-client/verification/verification_001_published.md b/spec/light-client/verification/verification_001_published.md index 0a63803d7..06a84e374 100644 --- a/spec/light-client/verification/verification_001_published.md +++ b/spec/light-client/verification/verification_001_published.md @@ -472,8 +472,6 @@ type LightBlock struct { Header Header Commit Commit Validators ValidatorSet - NextValidators ValidatorSet - Provider PeerID } ``` diff --git a/spec/light-client/verification/verification_002_draft.md b/spec/light-client/verification/verification_002_draft.md index e502880bb..9047eb417 100644 --- a/spec/light-client/verification/verification_002_draft.md +++ b/spec/light-client/verification/verification_002_draft.md @@ -486,8 +486,6 @@ type LightBlock struct { Header Header Commit Commit Validators ValidatorSet - NextValidators ValidatorSet - Provider PeerID } ```