From 4194d4da469ba405b4e82448745797949adb7bef Mon Sep 17 00:00:00 2001 From: William Banfield Date: Wed, 18 May 2022 14:46:00 -0400 Subject: [PATCH] comment proposal extensions validation --- internal/state/execution.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/state/execution.go b/internal/state/execution.go index 32236afcc..47c2cb7ae 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -466,6 +466,11 @@ func buildExtendedCommitInfo(ec *types.ExtendedCommit, store Store, initialHeigh } var ext []byte + // Check if vote extensions were enabled during the commit's height: ec.Height. + // ec is the commit from the previous height, so if extensions were enabled + // during that height, we ensure they are present and deliver the data to + // the proposer. If they were not enabled during this previous height, we + // will not deliver extension data. if ap.VoteExtensionsEnabled(ec.Height) && ecs.BlockIDFlag == types.BlockIDFlagCommit { if err := ecs.EnsureExtension(); err != nil { panic(fmt.Errorf("commit at height %d received with missing vote extensions data", ec.Height))