Skip to content

Commit

Permalink
update ocr values, respond to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAustinWang committed Feb 24, 2025
1 parent 802d73c commit 60640a0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 26 deletions.
4 changes: 2 additions & 2 deletions deployment/ccip/changeset/globals/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ const (
InflightCacheExpiry = 10 * time.Minute
RootSnoozeTime = 30 * time.Minute
BatchingStrategyID = 0
DeltaProgress = 30 * time.Second
DeltaProgress = 10 * time.Second
DeltaResend = 10 * time.Second
DeltaInitial = 20 * time.Second
DeltaRound = 2 * time.Second
DeltaGrace = 2 * time.Second
DeltaCertifiedCommitRequest = 10 * time.Second
DeltaStage = 10 * time.Second
Rmax = 3
Rmax = 50
MaxDurationQuery = 500 * time.Millisecond
MaxDurationObservation = 5 * time.Second
MaxDurationShouldAcceptAttestedReport = 10 * time.Second
Expand Down
4 changes: 2 additions & 2 deletions deployment/common/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ func (params OCRParameters) Validate() error {
if params.DeltaCertifiedCommitRequest <= 0 {
return errors.New("deltaCertifiedCommitRequest must be positive")
}
if params.DeltaStage <= 0 {
return errors.New("deltaStage must be positive")
if params.DeltaStage < 0 {
return errors.New("deltaStage must be positive or 0 for disabled")
}
if params.Rmax <= 0 {
return errors.New("rmax must be positive")
Expand Down
6 changes: 5 additions & 1 deletion integration-tests/load/ccip/ccip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ func TestCCIPLoad_RPS(t *testing.T) {

_, err = p.Run(true)
require.NoError(t, err)
close(loadFinished)
// wait some duration so that transmits can happen
go func() {
time.Sleep(tickerDuration)
close(loadFinished)
}()

// after load is finished, wait for a "timeout duration" before considering that messages are timed out
timeout := userOverrides.GetTimeoutDuration()
Expand Down
23 changes: 4 additions & 19 deletions integration-tests/load/ccip/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func subscribeTransmitEvents(
SourceChainSelector: srcChainSel,
DestChainSelector: cs,
}] = SeqNumRange{
// we use the maxuint as a sentinel value here to ensure we always get the lowest possible seqnum
Start: atomic.NewUint64(math.MaxUint64),
End: atomic.NewUint64(0),
}
Expand All @@ -90,23 +91,6 @@ func subscribeTransmitEvents(
})
defer subscription.Unsubscribe()

endChannel := make(chan struct{})
// wait for load to finish + timeout duration to allow any stragglers to
go func() {
for {
select {
case <-loadFinished:
lggr.Infow("load finished, waiting before stopping transmit watcher",
"srcChain", srcChainSel)
go func() {
time.Sleep(tickerDuration)
close(endChannel)
}()
return
}
}
}()

for {
select {
case <-subscription.Err():
Expand Down Expand Up @@ -150,9 +134,10 @@ func subscribeTransmitEvents(
lggr.Errorw("received context cancel signal for transmit watcher",
"srcChain", srcChainSel)
return
case <-endChannel:
case <-loadFinished:
lggr.Debugw("load finished, closing transmit watchers", "srcChainSel", srcChainSel)
for csPair, seqNums := range seqNums {
lggr.Debugw("pushing finalized sequence numbers for ",
lggr.Infow("pushing finalized sequence numbers for ",
"srcChainSelector", srcChainSel,
"destChainSelector", csPair.DestChainSelector,
"seqNums", seqNums)
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/testconfig/ccip/ccip.toml
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ ephemeral_addresses_number = 0
MessageTypeWeights = [100,0,0]
# each destination chain will receive 1 incoming request per RequestFrequency for the duration of LoadDuration
RequestFrequency = "5s"
LoadDuration = "10m"
LoadDuration = "5h"
# destination chain selectors to send messages to
NumDestinationChains = 8
# Directory where we receive environment configuration from crib
CribEnvDirectory = "../../../../crib/deployments/ccip-v2/.tmp"
TimeoutDuration = "20m"
TimeoutDuration = "30m"

0 comments on commit 60640a0

Please sign in to comment.