Skip to content

Commit

Permalink
Set MaxLogsKept to 1
Browse files Browse the repository at this point in the history
Also:

- Lower LogPrunePageSize from default 10,000 to 999

With present settings, it's running once every 40 mins and deleting
around 3200 logs. This only takes a few seconds, but appears to be
slowing down other queries a bit when it happens. Cutting this down
to 999 will hopefully keep it more stable.
  • Loading branch information
reductionista committed Sep 26, 2024
1 parent badaefb commit 1974d24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/services/relay/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ func (r *Relayer) NewCCIPCommitProvider(rargs commontypes.RelayArgs, pargs commo
subjectID := chainToUUID(configWatcher.chain.ID())
contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ks.Eth(), configWatcher, configTransmitterOpts{
subjectID: &subjectID,
}, OCR2AggregatorTransmissionContractABI, WithReportToEthMetadata(fn), WithRetention(0))
}, OCR2AggregatorTransmissionContractABI, WithReportToEthMetadata(fn), WithMaxLogsKept(1))
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -517,7 +517,7 @@ func (r *Relayer) NewCCIPExecProvider(rargs commontypes.RelayArgs, pargs commont
subjectID := chainToUUID(configWatcher.chain.ID())
contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ks.Eth(), configWatcher, configTransmitterOpts{
subjectID: &subjectID,
}, OCR2AggregatorTransmissionContractABI, WithReportToEthMetadata(fn), WithRetention(0), WithExcludeSignatures())
}, OCR2AggregatorTransmissionContractABI, WithReportToEthMetadata(fn), WithMaxLogsKept(1), WithExcludeSignatures())
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ DeltaReconcile = '5s'

CommonChainConfigTOML = """
LogPollInterval = '1s'
LogPrunePageSize = 5001
LogKeepBlocksDepth = 1000
LogPrunePageSize = 999
LogKeepBlocksDepth = 4000
[HeadTracker]
HistoryDepth = 200
Expand Down

0 comments on commit 1974d24

Please sign in to comment.