From 8bd2322b7b97706772af30e7538ca738da4685ba Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 16 Oct 2024 14:00:13 -0300 Subject: [PATCH] Add comment --- lib/grandpa/warp_sync.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/grandpa/warp_sync.go b/lib/grandpa/warp_sync.go index bca32c3f5d..b626f0ea62 100644 --- a/lib/grandpa/warp_sync.go +++ b/lib/grandpa/warp_sync.go @@ -74,6 +74,10 @@ func (w *WarpSyncProof) lastProofBlockNumber() uint64 { return w.Proofs[len(w.Proofs)-1].Justification.Justification.Commit.TargetNumber + 1 } +// The warp proof is verified by traversing the warp proof fragments, +// then we verify the justifications against the authorities based on the +// genesis authorities and the scheduled changes. +// If we are able to verify all the fragments, then the warp proof is valid. func (w *WarpSyncProof) verify( setId grandpa.SetID, authorities primitives.AuthorityList,