Skip to content

Commit

Permalink
Increase TestInitialDeploy timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
rstout committed Nov 1, 2024
1 parent 654e68e commit 079d098
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ccip-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Run ccip ocr3 initial deploy integration test
run: |
cd $GITHUB_WORKSPACE/chainlink/deployment
go test -v -run '^TestInitialDeploy$' -timeout 6m ./ccip/changeset
go test -v -run '^TestInitialDeploy$' -timeout 15m ./ccip/changeset
EXITCODE=${PIPESTATUS[0]}
if [ $EXITCODE -ne 0 ]; then
echo "Integration test failed"
Expand Down
20 changes: 18 additions & 2 deletions execute/exectypes/costly_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ func (o *CCIPCostlyMessageObserver) Observe(
return nil, fmt.Errorf("missing exec cost for message %s", msg.Header.MessageID)
}
if fee.Cmp(execCost) < 0 {
o.lggr.Warnw("message is too costly to execute", "messageID",
msg.Header.MessageID.String(), "fee", fee, "execCost", execCost, "seqNum", msg.Header.SequenceNumber)
costlyMessages = append(costlyMessages, msg.Header.MessageID)
}
}
Expand Down Expand Up @@ -303,6 +305,7 @@ func (c *CCIPMessageFeeUSD18Calculator) MessageFeeUSD18(
new(big.Int).Mul(linkPriceUSD.Int, msg.FeeValueJuels.Int),
new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil),
)
unboostedFee := feeUSD18
timestamp, ok := messageTimeStamps[msg.Header.MessageID]
if !ok {
// If a timestamp is missing we can't do fee boosting, but we still record the fee. In the worst case, the
Expand All @@ -312,6 +315,8 @@ func (c *CCIPMessageFeeUSD18Calculator) MessageFeeUSD18(
feeUSD18 = waitBoostedFee(c.now().Sub(timestamp), feeUSD18, c.relativeBoostPerWaitHour)
}

c.lggr.Warnw("message fee", "messageID", msg.Header.MessageID.String(), "fee", feeUSD18,
"linkPriceUSD", linkPriceUSD, "feeValueJuels", msg.FeeValueJuels, "unboostedFee", unboostedFee)
messageFees[msg.Header.MessageID] = feeUSD18
}

Expand Down Expand Up @@ -371,7 +376,7 @@ func (c *CCIPMessageExecCostUSD18Calculator) MessageExecCostUSD18(

for _, msg := range messages {
executionCostUSD18 := c.computeExecutionCostUSD18(executionFee, msg)
dataAvailabilityCostUSD18 := computeDataAvailabilityCostUSD18(daFee, daConfig, msg)
dataAvailabilityCostUSD18 := computeDataAvailabilityCostUSD18(c.lggr, daFee, daConfig, msg)
totalCostUSD18 := new(big.Int).Add(executionCostUSD18, dataAvailabilityCostUSD18)
messageExecCosts[msg.Header.MessageID] = totalCostUSD18
}
Expand Down Expand Up @@ -406,6 +411,10 @@ func (c *CCIPMessageExecCostUSD18Calculator) getFeesUSD18(
new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil),
)

c.lggr.Warnw("execution fee", "nativeTokenPrice", nativeTokenPrice,
"feeComponents.ExecutionFee", feeComponents.ExecutionFee, "feeComponents.DataAvailabilityFee",
feeComponents.DataAvailabilityFee, "executionFee", executionFee, "dataAvailabilityFee", dataAvailabilityFee)

return executionFee, dataAvailabilityFee, nil
}

Expand All @@ -418,11 +427,14 @@ func (c *CCIPMessageExecCostUSD18Calculator) computeExecutionCostUSD18(
) plugintypes.USD18 {
messageGas := new(big.Int).SetUint64(c.estimateProvider.CalculateMessageMaxGas(message))
cost := new(big.Int).Mul(messageGas, executionFee)
c.lggr.Warnw("computeExecutionCostUSD18", "messageID", message.Header.MessageID.String(), "messageGas",
messageGas, "executionFee", executionFee, "cost", cost)
return cost
}

// computeDataAvailabilityCostUSD18 computes the data availability cost of a message in USD18s.
func computeDataAvailabilityCostUSD18(
lggr logger.Logger,
dataAvailabilityFee *big.Int,
daConfig cciptypes.DataAvailabilityGasConfig,
message cciptypes.Message,
Expand All @@ -432,7 +444,11 @@ func computeDataAvailabilityCostUSD18(
}

messageGas := calculateMessageMaxDAGas(message, daConfig)
return big.NewInt(0).Mul(messageGas, dataAvailabilityFee)
cost := big.NewInt(0).Mul(messageGas, dataAvailabilityFee)
lggr.Warnw("computeDataAvailabilityCostUSD18", "messageID", message.Header.MessageID.String(), "messageGas",
messageGas, "daConfig", daConfig, "cost", cost)

return cost
}

// calculateMessageMaxDAGas calculates the total DA gas needed for a CCIP message
Expand Down

0 comments on commit 079d098

Please sign in to comment.