Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ccip/config/evm/Arbitrum_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ OracleType = 'arbitrum'

[NodePool]
SyncThreshold = 10

[OCR2.Automation]
GasLimit = 14500000
3 changes: 0 additions & 3 deletions ccip/config/evm/Arbitrum_Sepolia.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,3 @@ OracleType = 'arbitrum'

[NodePool]
SyncThreshold = 10

[OCR2.Automation]
GasLimit = 14500000
3 changes: 0 additions & 3 deletions ccip/config/evm/Base_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ SyncThreshold = 10

[OCR]
ContractConfirmations = 1

[OCR2.Automation]
GasLimit = 6500000
3 changes: 0 additions & 3 deletions ccip/config/evm/Base_Sepolia.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ SyncThreshold = 10

[OCR]
ContractConfirmations = 1

[OCR2.Automation]
GasLimit = 6500000
3 changes: 0 additions & 3 deletions ccip/config/evm/Ethereum_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ EIP1559DynamicFees = true
# EIP-1559 does well on a smaller block history size
BlockHistorySize = 4
TransactionPercentile = 50

[OCR2.Automation]
GasLimit = 10500000
3 changes: 0 additions & 3 deletions ccip/config/evm/Ethereum_Sepolia.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ EIP1559DynamicFees = true
[GasEstimator.BlockHistory]
BlockHistorySize = 4
TransactionPercentile = 50

[OCR2.Automation]
GasLimit = 10500000
3 changes: 0 additions & 3 deletions ccip/config/evm/Fantom_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ RPCBlockQueryDelay = 2
[GasEstimator]
# Fantom network has been slow to include txs at times when using the BlockHistory estimator, and the recommendation is to use SuggestedPrice mode.
Mode = 'SuggestedPrice'

[OCR2.Automation]
GasLimit = 3800000
3 changes: 0 additions & 3 deletions ccip/config/evm/Fantom_Testnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ RPCBlockQueryDelay = 2

[GasEstimator]
Mode = 'SuggestedPrice'

[OCR2.Automation]
GasLimit = 3800000
3 changes: 0 additions & 3 deletions ccip/config/evm/Optimism_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ SyncThreshold = 10

[OCR]
ContractConfirmations = 1

[OCR2.Automation]
GasLimit = 6500000
3 changes: 0 additions & 3 deletions ccip/config/evm/Optimism_Sepolia.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ SyncThreshold = 10

[OCR]
ContractConfirmations = 1

[OCR2.Automation]
GasLimit = 6500000
3 changes: 0 additions & 3 deletions ccip/config/evm/Soneium_Sepolia.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ SyncThreshold = 10

[OCR]
ContractConfirmations = 1

[OCR2.Automation]
GasLimit = 6500000
3 changes: 0 additions & 3 deletions ccip/config/evm/fallback.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,5 @@ DeltaCOverride = '168h'
DeltaCJitterOverride = '1h'
ObservationGracePeriod = '1s'

[OCR2.Automation]
GasLimit = 5400000

[Workflow]
GasLimitDefault = 400_000
16 changes: 11 additions & 5 deletions core/capabilities/webapi/outgoing_connector_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const (
errorIncomingRatelimitSender = "message from gateway exceeded per sender rate limit"
)

// rateLimitedError marks an error as caused by the node's local outgoing rate limiter,
// so it can be reported as its own status distinct from a downstream transport/gateway failure.
type rateLimitedError struct{ error }

var _ connector.GatewayConnectorHandler = &OutgoingConnectorHandler{}

type OutgoingConnectorHandler struct {
Expand Down Expand Up @@ -97,10 +101,12 @@ func (c *OutgoingConnectorHandler) HandleSingleNodeRequest(ctx context.Context,
totalDuration := time.Since(start)
status := "fail"
switch {
case errors.Is(err, context.DeadlineExceeded):
status = "timeout"
case err == nil:
status = "success"
case errors.Is(err, context.DeadlineExceeded):
status = "timeout"
case errors.As(err, &rateLimitedError{}):
status = "rate_limited"
}
c.metrics.recordSingleNodeRequestDuration(ctx, totalDuration, status, req.WorkflowID)

Expand All @@ -111,10 +117,10 @@ func (c *OutgoingConnectorHandler) handleSingleNodeRequest(ctx context.Context,
lggr := logger.With(c.lggr, "messageID", messageID, "workflowID", req.WorkflowID)
workflowAllow, globalAllow := c.outgoingRateLimiter.AllowVerbose(req.WorkflowID)
if !workflowAllow {
return nil, errors.New(errorOutgoingRatelimitWorkflow)
return nil, rateLimitedError{errors.New(errorOutgoingRatelimitWorkflow)}
}
if !globalAllow {
return nil, errors.New(errorOutgoingRatelimitGlobal)
return nil, rateLimitedError{errors.New(errorOutgoingRatelimitGlobal)}
}

// set default timeout if not provided for all outgoing requests
Expand Down Expand Up @@ -513,5 +519,5 @@ func newMetrics(method string) (*metrics, error) {
return nil, err
}

return &metrics{handleDuration: h, awaitConnDuration: a}, nil
return &metrics{handleDuration: h, awaitConnDuration: a, method: method}, nil
}
8 changes: 4 additions & 4 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ require (
github.com/rs/zerolog v1.35.1
github.com/shopspring/decimal v1.4.0
github.com/smartcontractkit/chain-selectors v1.0.111
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260908164107-3de1349d970b
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260916222901-720a003dab50
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260917115705-1d3a14a9b049
github.com/smartcontractkit/chainlink-common/keystore v1.3.1-0.20260903141829-ef07b52a737d
github.com/smartcontractkit/chainlink-deployments-framework v0.122.2
Expand Down Expand Up @@ -510,9 +510,9 @@ require (
github.com/smartcontractkit/chainlink-aptos v0.0.0-20260828090428-9828cc37ebc2 // indirect
github.com/smartcontractkit/chainlink-aptos/codec v0.0.0-20260716230027-bd85997bc03c // indirect
github.com/smartcontractkit/chainlink-canton/contracts/v2 v2.0.0 // indirect
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260908155618-50f521d70e62 // indirect
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260908155618-50f521d70e62 // indirect
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260908155618-50f521d70e62 // indirect
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260916222901-720a003dab50 // indirect
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260916222901-720a003dab50 // indirect
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260916222901-720a003dab50 // indirect
github.com/smartcontractkit/chainlink-ccv v0.13.1-0.20260918171034-c93b0d2ef3c0 // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260915184316-2730f1867c92 // indirect
github.com/smartcontractkit/chainlink-confidential-compute v1.3.0 // indirect
Expand Down
16 changes: 8 additions & 8 deletions core/scripts/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 70 additions & 3 deletions core/services/gateway/handlers/capabilities/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func (h *handler) sendHTTPMessageToClient(ctx context.Context, req network.HTTPR

func (h *handler) handleWebAPIOutgoingMessage(ctx context.Context, msg *api.Message, nodeAddr string) error {
h.lggr.Debugw("handling webAPI outgoing message", "messageId", msg.Body.MessageID, "nodeAddr", nodeAddr)
h.metrics.recordArtifactFetchRequestReceived(ctx, msg.Body.Method)
if !h.nodeRateLimiter.Allow(nodeAddr) {
return fmt.Errorf("rate limit exceeded for node %s", nodeAddr)
}
Expand All @@ -134,9 +135,17 @@ func (h *handler) handleWebAPIOutgoingMessage(ctx context.Context, msg *api.Mess
newCtx := context.WithoutCancel(ctx)
newCtx, cancel := context.WithTimeout(newCtx, timeout)
defer cancel()
l := logger.With(h.lggr, "url", payload.URL, "messageId", msg.Body.MessageID, "method", payload.Method, "timeout", payload.TimeoutMs)
l := logger.With(h.lggr, "url", payload.URL, "messageId", msg.Body.MessageID, "method", payload.Method, "timeout", payload.TimeoutMs, "workflowID", payload.WorkflowID)
l.Debug("Sending request to client")
respMsg, err := h.sendHTTPMessageToClient(newCtx, req, msg)
switch {
case err == nil:
h.metrics.recordArtifactFetchOutcome(newCtx, fetchOutcomeSuccess)
case errors.Is(err, context.DeadlineExceeded):
h.metrics.recordArtifactFetchOutcome(newCtx, fetchOutcomeTimeout)
default:
h.metrics.recordArtifactFetchOutcome(newCtx, fetchOutcomeExternalError)
}
if err != nil {
l.Errorw("error while sending HTTP request to external endpoint", "err", err)
payload := Response{
Expand Down Expand Up @@ -173,6 +182,7 @@ func (h *handler) handleWebAPIOutgoingMessage(ctx context.Context, msg *api.Mess
return
}
err = h.don.SendToNode(newCtx, nodeAddr, req)
h.metrics.recordArtifactFetchResponseDelivery(newCtx, err == nil)
if err != nil {
l.Errorw("failed to send to node", "err", err, "to", nodeAddr)
return
Expand Down Expand Up @@ -228,8 +238,17 @@ func (h *handler) HandleLegacyUserMessage(_ context.Context, _ *api.Message, _ h
return errors.New("capabilities handler does not support legacy user messages")
}

const (
fetchOutcomeSuccess = "success"
fetchOutcomeTimeout = "timeout"
fetchOutcomeExternalError = "external_error"
)

type metrics struct {
handleDuration metric.Int64Histogram
handleDuration metric.Int64Histogram
requestsTotal metric.Int64Counter
fetchOutcomeTotal metric.Int64Counter
deliveryTotal metric.Int64Counter
}

func (m *metrics) recordHandleDuration(ctx context.Context, d time.Duration, method string, success bool) {
Expand All @@ -243,11 +262,59 @@ func (m *metrics) recordHandleDuration(ctx context.Context, d time.Duration, met
))
}

// recordArtifactFetchRequestReceived counts every artifact-fetch request the gateway
// receives from a node, independent of whether it is later rate-limited or fails.
func (m *metrics) recordArtifactFetchRequestReceived(ctx context.Context, method string) {
m.requestsTotal.Add(ctx, 1, metric.WithAttributes(
attribute.String("method", method),
))
}

// recordArtifactFetchOutcome counts the result of the outbound HTTP call the gateway
// makes to the external endpoint on behalf of the node.
func (m *metrics) recordArtifactFetchOutcome(ctx context.Context, outcome string) {
m.fetchOutcomeTotal.Add(ctx, 1, metric.WithAttributes(
attribute.String("outcome", outcome),
))
}

// recordArtifactFetchResponseDelivery counts whether the gateway succeeded in delivering
// the fetch result back to the requesting node over the DON connection.
func (m *metrics) recordArtifactFetchResponseDelivery(ctx context.Context, success bool) {
successStr := "false"
if success {
successStr = "true"
}
m.deliveryTotal.Add(ctx, 1, metric.WithAttributes(
attribute.String("success", successStr),
))
}

func newMetrics() (*metrics, error) {
h, err := beholder.GetMeter().Int64Histogram("platform_gateway_capabilities_handle_node_message_duration_ms")
if err != nil {
return nil, err
}

return &metrics{handleDuration: h}, nil
requestsTotal, err := beholder.GetMeter().Int64Counter("platform_gateway_capabilities_artifact_fetch_requests_total")
if err != nil {
return nil, err
}

fetchOutcomeTotal, err := beholder.GetMeter().Int64Counter("platform_gateway_capabilities_artifact_fetch_outcome_total")
if err != nil {
return nil, err
}

deliveryTotal, err := beholder.GetMeter().Int64Counter("platform_gateway_capabilities_response_delivery_total")
if err != nil {
return nil, err
}

return &metrics{
handleDuration: h,
requestsTotal: requestsTotal,
fetchOutcomeTotal: fetchOutcomeTotal,
deliveryTotal: deliveryTotal,
}, nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ func addLaneAptosChangesets(

return []commoncs.ConfiguredChangeSet{
commoncs.Configure(
lanes.ConnectChains(lanes.GetLaneAdapterRegistry(), cs_ccip.GetRegistry()),
// These are v1.6.0 lanes, so no v2 lane version resolver is wired and the
// downgrade guard is disabled.
lanes.ConnectChains(lanes.GetLaneAdapterRegistry(), cs_ccip.GetRegistry(), nil),
lanes.ConnectChainsConfig{
MCMS: ccipmcms.Input{
ValidUntil: validUntil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,9 @@ func addSuiSolanaLaneChangesets(

return []commoncs.ConfiguredChangeSet{
commoncs.Configure(
lanes.ConnectChains(lanes.GetLaneAdapterRegistry(), cs_ccip.GetRegistry()),
// These are v1.6.0 lanes, so no v2 lane version resolver is wired and the
// downgrade guard is disabled.
lanes.ConnectChains(lanes.GetLaneAdapterRegistry(), cs_ccip.GetRegistry(), nil),
lanes.ConnectChainsConfig{
MCMS: ccipmcms.Input{
ValidUntil: validUntil,
Expand Down
12 changes: 6 additions & 6 deletions deployment/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ require (
github.com/smartcontractkit/chainlink-aptos v0.0.0-20260828090428-9828cc37ebc2
github.com/smartcontractkit/chainlink-aptos/codec v0.0.0-20260716230027-bd85997bc03c
github.com/smartcontractkit/chainlink-aptos/deployment v0.0.0-20260706100550-d43558069754
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260908155618-50f521d70e62
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260908164107-3de1349d970b
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260908155618-50f521d70e62
github.com/smartcontractkit/chainlink-ccip/chains/solana/deployment v0.0.0-20260908155618-50f521d70e62
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260908155618-50f521d70e62
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260908155618-50f521d70e62
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260916222901-720a003dab50
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260916222901-720a003dab50
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260916222901-720a003dab50
github.com/smartcontractkit/chainlink-ccip/chains/solana/deployment v0.0.0-20260916222901-720a003dab50
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260916222901-720a003dab50
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260916222901-720a003dab50
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260917115705-1d3a14a9b049
github.com/smartcontractkit/chainlink-common/keystore v1.3.1-0.20260903141829-ef07b52a737d
github.com/smartcontractkit/chainlink-data-streams v1.1.1
Expand Down
24 changes: 12 additions & 12 deletions deployment/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading