Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
iansuvak committed Oct 15, 2024
1 parent 67c8dda commit 8f7bb71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions signature-aggregator/aggregator/proposer_height_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ const (
maxHeightDifference = 30
)

// ProposerHeightCache stores a list of recently accepted P-chain block heights and their blockTimes
// It exposes [GetOptimalHeight] method which returns the best guess for a proposerVM height of the P-chain
// that will result in a valid aggregated signature.
// ProposerVM currently uses the most recent block height outside of the 30 seconds lookback window.
// This struct reconstructs this value by querying for current height and block times for recent chain heights.
type ProposerHeightCache struct {
logger logging.Logger
pChainClient validators.CanonicalValidatorClient
Expand Down

0 comments on commit 8f7bb71

Please sign in to comment.