Skip to content

Commit

Permalink
chore: reduce per block prune of TWAP from 1000 to 200 (#7638)
Browse files Browse the repository at this point in the history
* reduce per block prune of twap from 1000 to 200

* fix comment
  • Loading branch information
czarcas7ic authored Mar 1, 2024
1 parent e2292bb commit 1d0698c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions x/twap/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ import (
)

// NumRecordsToPrunePerBlock is the number of records to prune per block.
// Two records are deleted per incentive record:
// 1. by time index
// 2. by pool index
// Therefore, setting this to 1000 means 500 complete incentive records are deleted per block.
// One record indexed by pool ID is deleted per incentive record.
// Therefore, setting this to 200 means 200 complete incentive records are deleted per block.
// The choice is somewhat arbitrary
// However, th intuition is that the number should be low enough to not make blocks take longer but
// not too small where it would take all the way to the next epoch.
var NumRecordsToPrunePerBlock uint16 = 1000
var NumRecordsToPrunePerBlock uint16 = 200

type timeTooOldError struct {
Time time.Time
Expand Down

0 comments on commit 1d0698c

Please sign in to comment.